I think Windows has its own timer event, WM_TIMER, too, but that's enough for one post.
?
2016-12-02 09:15:30 UTC
evidence is for arithmetic. technological expertise deals with evidence. i've got considered how creationists "interpret" the evidence to make it help creationism. that's humorous while it is not so stupid which you're banging your head on the table. no individual who makes use of the old argument approximately including counsel has ever been waiting to outline "counsel" in a fashion it is clever to a scientist. it particularly is merely hand-waving that impresses creationists who understand no longer something approximately technological expertise. Geneticists can element to various approaches wherein mutations upload genetic variety, that's probably what they think of "counsel" is yet won't particularly say so. given which you're a creationist i'm going to flow forward and assume that like various different creationist i've got ever run into, you haven't any longer have been given any activity in data, evidence or logical arguments. you merely desire to evangelise. We become uninterested in writing out long, informational solutions purely to have them skipped over.
oops
2010-10-21 03:26:56 UTC
#include
int main()
{
clock_t end_time = clock() + 60 * CLOCKS_PER_SEC;
while(clock() < end_time)
{
// your code here
}
}
If your code is more linear in nature, and you don't want to constantly check the time, you just want to end your program abruptly, you can use threads. Here's an example using boost, which if you don't have, you should. http://www.boost.org/
#include
#include
#include
void threadmain()
{
// Your main program here
}
int main()
{
boost::thread th(threadmain);
clock_t end_time = clock() + 5 * CLOCKS_PER_SEC;
while(clock() < end_time)
{}
// program ends abruptly, whether the other thread is done or not
}
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.