/ Published in: C++
Function argument timeinterval is in seconds. For example, SimpleTimer( 5 ) would cause the program to wait for 5 seconds to elapse.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
void SimpleTimer( int timeinterval ) { int starttime, currenttime, difference; starttime = time( null ); do { currenttime = time( null ); difference = currenttime - starttime; } while( difference < timeinterval ) }