|
-
April 28th, 1999, 12:12 AM
#4
Re: Timer
#include<time.h>
bool time_out_spec(int milli_seconde)
{
int x=0;
int y=0;
y=clock();
int msec=milli_seconde;
debut://french word meaning start
x=clock();
if ((x-y)>=msec)
{
return 1;
}
else goto debut;
}
this is how I do that,
void main()
{
time_out(500);
cout<<"half seconds have past"<<endl;
}
I think that it's good, I never have compiler
error, no warning at level 4 (VC++ 6.0).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|