CH_Tools::Clock Class Reference
[Clock (time measurement in Microseconds)]

allows measuring time difference to its initialization time in Microseconds More...

#include <clock.hxx>

List of all members.

Public Member Functions

void start ()
 read current time, all further time measurements will be in relation to this time
 Clock ()
 calls start()
 ~Clock ()
 nothing particular
void set_offset (Microseconds offs)
 allows to specify an offset, that will furtheron be added to all time measurements
Microseconds time () const
 return time elapsed since last call to start() in Microseconds (possibly adding an optional offset)
void elapsed_time (std::ostream &out) const
 call time() and print the result in format "hh:mm:ss", togehter with current date and time, to out

Private Attributes

Microseconds t_start
Microseconds offset
long l_start

Friends

std::ostream & operator<< (std::ostream &out, const Clock &cl)
 call cl.time() and print the result in format "hh:mm:ss" to out


Detailed Description

allows measuring time difference to its initialization time in Microseconds

the clock is initiliazed by calling start() (this also happens automatically at construction) and returns, at each call to time(), the time passed since the last call to start() in Microseconds (optionally plus a given offset specified by set_offset() ). The routine elapsed_time() prints the current time difference together with current date and time to an output strean.


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

Generated on Tue May 3 16:52:54 2011 for ConicBundle by  doxygen 1.5.6