m2etis  0.4
m2etis::util::Clock< Updater > Class Template Reference

Clock for time handling, Updater is the implementation of the time, like a RealTimeClock measuring real time. More...

#include <Clock.h>

Inheritance diagram for m2etis::util::Clock< Updater >:
Inheritance graph

Public Member Functions

 Clock ()
 initializes Clock and propagates Update method to Updater More...
 
 ~Clock ()
 destructor More...
 
uint64_t getTime () const
 Will return the time since the Clock on the rendezvouz node has started. More...
 
uint64_t getRealTime () const
 Will return the real time since the Clock has been started. More...
 
uint64_t registerTimer ()
 returns a new ID for a timer More...
 
void unregisterTimer (uint64_t timerID)
 frees a timer ID More...
 
void updateWaitTime (uint64_t timerID, uint64_t time)
 updates the time a given timer has to wait More...
 
bool waitForTime (uint64_t timerID, uint64_t time)
 timer with timerID will wait for time and then be unlocked again More...
 
bool isRunning ()
 gets state of the Clock More...
 
void setOffset (uint64_t offset)
 sets offset of this Clock to adjust times over network More...
 

Detailed Description

template<class Updater>
class m2etis::util::Clock< Updater >

Clock for time handling, Updater is the implementation of the time, like a RealTimeClock measuring real time.

Definition at line 39 of file Clock.h.

Constructor & Destructor Documentation

template<class Updater>
m2etis::util::Clock< Updater >::Clock ( )
inline

initializes Clock and propagates Update method to Updater

Definition at line 44 of file Clock.h.

template<class Updater>
m2etis::util::Clock< Updater >::~Clock ( )
inline

destructor

Definition at line 51 of file Clock.h.

Member Function Documentation

template<class Updater>
uint64_t m2etis::util::Clock< Updater >::getRealTime ( ) const
inline

Will return the real time since the Clock has been started.

Returns
Current time in microseconds

Definition at line 77 of file Clock.h.

Here is the caller graph for this function:

template<class Updater>
uint64_t m2etis::util::Clock< Updater >::getTime ( ) const
inline

Will return the time since the Clock on the rendezvouz node has started.

Returns
Current time in microseconds

Definition at line 68 of file Clock.h.

Here is the caller graph for this function:

template<class Updater>
bool m2etis::util::Clock< Updater >::isRunning ( )
inline

gets state of the Clock

Definition at line 134 of file Clock.h.

template<class Updater>
uint64_t m2etis::util::Clock< Updater >::registerTimer ( )
inline

returns a new ID for a timer

Definition at line 84 of file Clock.h.

template<class Updater>
void m2etis::util::Clock< Updater >::setOffset ( uint64_t  offset)
inline

sets offset of this Clock to adjust times over network

Definition at line 141 of file Clock.h.

Here is the caller graph for this function:

template<class Updater>
void m2etis::util::Clock< Updater >::unregisterTimer ( uint64_t  timerID)
inline

frees a timer ID

Definition at line 97 of file Clock.h.

template<class Updater>
void m2etis::util::Clock< Updater >::updateWaitTime ( uint64_t  timerID,
uint64_t  time 
)
inline

updates the time a given timer has to wait

Definition at line 106 of file Clock.h.

template<class Updater>
bool m2etis::util::Clock< Updater >::waitForTime ( uint64_t  timerID,
uint64_t  time 
)
inline

timer with timerID will wait for time and then be unlocked again

Definition at line 118 of file Clock.h.


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