Public Member Functions
ibis::horometer Class Reference

Horometer -- a primitive timing instrument. More...

#include <horometer.h>

List of all members.

Public Member Functions

double CPUTime () const
 Return the CPU time in seconds.
double realTime () const
 Return the elapsed time in seconds.
void resume ()
 Continue after being stopped.
void start ()
 Start the timer. Clear the internal counters.
void stop ()
 Stop the timer. Record the duration. May resume later.

Detailed Description

Horometer -- a primitive timing instrument.

This is intented to be a simple timer that measure a single duration. It must be explicitly started by calling the function start. The same function start may be called to restart the timer which will discard the previous starting point. The function stop must be called before functions realTime and CPUTime can report correct time values. After a horometer is stopped, it may continue by calling start to count a new duration, or it may add to the existing duration by calling resume.

Timing accuracy depends on the underlying implementation. On most unix systems, the time resolution is about 0.01 seconds. The timing function itself may take ~10,000 clock cycles to execute, which is about 30 microseconds on a 400 MHz machine.


The documentation for this class was generated from the following file:

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive