Could Someone Post the Contents of Time.h and How to use it? I want to be able to continue my programa fter a certain while if the user does not input something after a speciied time period.
Could Someone Post the Contents of Time.h and How to use it? I want to be able to continue my programa fter a certain while if the user does not input something after a speciied time period.
Ok, to do something like that using time.h you can do something like this:
This doesn't check for user input, you will have to get someone else on that, but it will pause the program. You can always use the windows function Sleep(). Hope this helps you.PHP Code:
long int starttime=(long int)clock();
while(clock() - starttime < TIMELIMIT) //clock returns milliseconds
{} //Just have an empty while statement to pause the program.
//Do other stuff here
Last edited by Crossbow; 02-11-2002 at 07:44 PM.
I know that I might get flamed for this but oh well.
http://www.cplusplus.com/ref/ctime/