|
Robot Raconteur Core C++ Library
|
Represents. a point in time. Used by wire members to timestamp packets. More...
#include <DataTypes.h>
Public Member Functions | |
| TimeSpec () | |
| Construct empty timespec. | |
| TimeSpec (int64_t seconds, int32_t nanoseconds) | |
| Construct timespec with specified time. | |
| bool | operator== (const TimeSpec &t2) const |
| equality comparison | |
| bool | operator!= (const TimeSpec &t2) const |
| inequality comparison | |
| TimeSpec | operator- (const TimeSpec &t2) const |
| subtraction operator | |
| TimeSpec | operator+ (const TimeSpec &t2) const |
| addition operator | |
| bool | operator> (const TimeSpec &t2) const |
| greater-than comparison | |
| bool | operator>= (const TimeSpec &t2) const |
| greater-than-or-equal comparison | |
| bool | operator< (const TimeSpec &t2) const |
| less-then comparison | |
| bool | operator<= (const TimeSpec &t2) const |
| less-than-or-equal comparison | |
| void | cleanup_nanosecs () |
| normalize nanoseconds to be within 0 and 1e9-1 | |
Public Attributes | |
| int64_t | seconds |
| Seconds since epoch. | |
| int32_t | nanoseconds |
| Nanoseconds from epoch. Normalized to be between 0 and 1e9-1. | |
Represents. a point in time. Used by wire members to timestamp packets.
Time is always in UTC
Time is relative to the UNIX epoch "1970-01-01T00:00:00Z"
| RobotRaconteur::TimeSpec::TimeSpec | ( | int64_t | seconds, |
| int32_t | nanoseconds ) |
Construct timespec with specified time.
| seconds | Seconds since epoch |
| nanoseconds | Nanoseconds since epoch |