ConicBundle
|
allows measuring time difference to its initialization time in Microseconds More...
#include <clock.hxx>
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) | |
Microseconds | wall_time () const |
returns the Microseconds passed on the wall clock sind initialization | |
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 |
user time value on intialzation | |
Microseconds | offset |
use specified offset | |
Microseconds | wall_start |
wall clock time on initilazation | |
long | l_start |
if not unix, use long values instead | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Clock &cl) |
call cl.time() and print the result in format "hh:mm:ss" to out | |
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.