StopWatch

A StopWatch counts how many clockticks of CPU time have been used by your program. These can be converted to seconds by dividing by the standard macro CLOCKS_PER_SEC.

Interface

  StopWatch()  
Constructor; starts the stopwatch.
  std::clock_t read()  
Returns the number of clock ticks since the stopwatch started.
  void reset()  
Set the number of clockticks back to zero and start the stopwatch agan.
  std::clock_t restart()  
Read and reset the stopwatch.