Return to Snippet

Revision: 8749
at October 5, 2008 15:39 by Raisor


Initial Code
void SimpleTimer( int timeinterval )
{
  int starttime, currenttime, difference;

  starttime = time( null );

  do
  {
    currenttime = time( null );
    difference = currenttime - starttime;
  }
  while( difference < timeinterval )
}

Initial URL

                                

Initial Description
Function argument timeinterval is in seconds. For example, SimpleTimer( 5 ) would cause the program to wait for 5 seconds to elapse.

Initial Title
Simple C++ Timer

Initial Tags
simple

Initial Language
C++