#include <TmRealTime.h>
Inherits Marsyas::TmTimer.
Public Member Functions | |
| mrs_natural | getMicroSeconds () |
| get the system microseconds count | |
| mrs_natural | intervalsize (std::string interval) |
| convert the given interval into a number of micro seconds. | |
| mrs_natural | readTimeSrc () |
| get the difference between the current source control value and its value since it was last read. Does not currently work for Windows TODO! architecture as it relies on the Unix function gettimeofday(). | |
| TmRealTime (const TmRealTime &t) | |
| copy constructor | |
| TmRealTime (std::string name) | |
| named constructor. Given the identifier "TmRealTime/name" | |
| TmRealTime () | |
| empty constructor. Given the default name: System as in "TmRealTime/System" | |
| void | updtime () |
| updtime from TmTimer is overridden to directly set the cur_time_ with the system time rather than an offset since last read. This should avoid possible accumulation of error. | |
Protected Attributes | |
| int | last_usecs_ |
| last read count of microseconds. | |
Definition at line 40 of file TmRealTime.h.
| TmRealTime | ( | std::string | name | ) |
named constructor. Given the identifier "TmRealTime/name"
| name | a unique name to call this timer |
Definition at line 33 of file TmRealTime.cpp.
References TmRealTime::last_usecs_, and TmRealTime::readTimeSrc().
| TmRealTime | ( | const TmRealTime & | t | ) |
copy constructor
| t | timer to copy |
Definition at line 39 of file TmRealTime.cpp.
References TmTimer::name_.
| mrs_natural getMicroSeconds | ( | ) |
get the system microseconds count
Definition at line 47 of file TmRealTime.cpp.
Referenced by TmRealTime::readTimeSrc(), and TmRealTime::updtime().
| mrs_natural intervalsize | ( | std::string | interval | ) | [virtual] |
convert the given interval into a number of micro seconds.
The interval must be defined in real time units: us, ms, s, m, h, d.
| interval | the interval to calculate |
Implements TmTimer.
Definition at line 81 of file TmRealTime.cpp.
| mrs_natural readTimeSrc | ( | ) | [virtual] |
get the difference between the current source control value and its value since it was last read. Does not currently work for Windows TODO! architecture as it relies on the Unix function gettimeofday().
Implements TmTimer.
Definition at line 65 of file TmRealTime.cpp.
References TmRealTime::getMicroSeconds(), and TmRealTime::last_usecs_.
Referenced by TmRealTime::TmRealTime().
1.5.6