The TimeService is used for system-wide time keeping and conversions. More...
#include <rtt/TimeService.hpp>
Public Types | |
typedef double | Seconds |
The type used to store SI unit time keeping. | |
typedef long | secs |
An integer representation of seconds. | |
typedef long | msecs |
An integer representation of miliseconds. | |
typedef long | usecs |
An integer representation of microseconds. | |
typedef long long | nsecs |
An integer representation of nanoseconds. | |
typedef long long | ticks |
The type for the systems clock tick. | |
Public Member Functions | |
virtual | ~TimeService () |
Destructor. | |
ticks | ticksGet () const |
Get current tick of the System clock. | |
ticks | getTicks () const |
Get current tick of the System clock. | |
ticks | ticksGet (ticks &relativeTime) const |
Get clicks passed since a certain moment. | |
ticks | getTicks (ticks &relativeTime) const |
Get clicks passed since a certain moment. | |
ticks | ticksSince (ticks relativeTime) const |
Get clicks passed since a certain moment. | |
Seconds | secondsGet (ticks &relativeTime) const |
Get the time in seconds passed since a certain moment. | |
Seconds | getSeconds (ticks &relativeTime) const |
Get the time in seconds passed since a certain moment. | |
Seconds | secondsSince (ticks relativeTime) const |
Get Seconds passed since a certain moment. | |
Seconds | secondsChange (Seconds delta) |
Change the time with delta seconds. | |
void | enableSystemClock (bool yes_no) |
Enables or disables reading the system clock. | |
nsecs | getNSecs () const |
Get current nsecs of the System clock. | |
nsecs | getNSecs (nsecs &relativeTime) const |
Get nsecs passed since a certain moment. | |
Static Public Member Functions | |
static TimeService * | Instance () |
static bool | Release () |
Releases the TimeService Reference counting might aid in making this call safe. | |
static ticks | nsecs2ticks (const nsecs m) |
Convert an amount of nano seconds to System ticks. | |
static nsecs | ticks2nsecs (const ticks t) |
Convert an amount of ticks to nano seconds. | |
Static Public Attributes | |
static const ticks | InfiniteTicks |
The largest number representable in ticks. | |
static const nsecs | InfiniteNSecs |
The largest number representable in nsecs. | |
static const Seconds | InfiniteSeconds |
The largest number representable in Seconds. | |
Protected Member Functions | |
TimeService () | |
Constructor. |
The TimeService is used for system-wide time keeping and conversions.
Definition at line 34 of file TimeService.hpp.
void RTT::TimeService::enableSystemClock | ( | bool | yes_no | ) |
Enables or disables reading the system clock.
If disabled, you'll have to change time using secondsChange.
Get nsecs passed since a certain moment.
nsecs RTT::TimeService::getNSecs | ( | ) | const |
Get current nsecs of the System clock.
Get the time in seconds passed since a certain moment.
Get clicks passed since a certain moment.
ticks RTT::TimeService::getTicks | ( | ) | const |
Get current tick of the System clock.
Convert an amount of nano seconds to System ticks.
m | The amount of nano seconds |
static bool RTT::TimeService::Release | ( | ) | [static] |
Releases the TimeService Reference counting might aid in making this call safe.
Change the time with delta seconds.
Get the time in seconds passed since a certain moment.
Definition at line 132 of file TimeService.hpp.
Get Seconds passed since a certain moment.
If relativeTime is zero, the absolute syteme time is given.
Get clicks passed since a certain moment.
Definition at line 105 of file TimeService.hpp.
ticks RTT::TimeService::ticksGet | ( | ) | const [inline] |
Get current tick of the System clock.
Definition at line 89 of file TimeService.hpp.
Get clicks passed since a certain moment.
If relativeTime is zero, the absolute system time is given.