Structure representing timestamps with utilities. More...
Functions | |
| Timestamp () | |
| Default constructor. More... | |
| Timestamp (uint64_t _data_ns) | |
| Initialized the sl::Timestamp instance to a number in nanoseconds. More... | |
| uint64_t | getNanoseconds () const |
| Returns the timestamp in nanoseconds. More... | |
| uint64_t | getMicroseconds () const |
| Returns the timestamp in microseconds. More... | |
| uint64_t | getMilliseconds () const |
| Returns the timestamp in milliseconds. More... | |
| uint64_t | getSeconds () const |
| Returns the timestamp in seconds. More... | |
| void | setNanoseconds (uint64_t t_ns) |
| Sets the timestamp to a value in nanoseconds. More... | |
| void | setMicroseconds (uint64_t t_us) |
| Sets the timestamp to a value in microseconds. More... | |
| void | setMilliseconds (uint64_t t_ms) |
| Sets the timestamp to a value in milliseconds. More... | |
| void | setSeconds (uint64_t t_s) |
| Sets the timestamp to a value in seconds. More... | |
| Timestamp & | operator= (Timestamp other) |
| Copy the value of another sl::Timestamp. More... | |
| Timestamp & | operator= (uint64_t other_data_ns) |
| Sets the value of the sl::Timestamp to other_data_ns. More... | |
| Timestamp & | operator+= (const Timestamp &rhs) |
| Adds the value of another sl::Timestamp to the current one. More... | |
| Timestamp & | operator-= (const Timestamp &rhs) |
| Subtracts the value of another sl::Timestamp to the current one. More... | |
| Timestamp & | operator*= (const Timestamp &rhs) |
| Multiplies the value of another sl::Timestamp to the current one. More... | |
| Timestamp & | operator/= (const Timestamp &rhs) |
| Divides the value of the current sl::Timestamp by another one. More... | |
| operator unsigned long long int () const | |
| Convert the sl::Timestamp into a unsigned long long int. More... | |
Attributes | |
| uint64_t | data_ns = 0 |
| Timestamp in nanoseconds. More... | |
Structure representing timestamps with utilities.
|
inline |
Default constructor.
Initialized the sl::Timestamp instance to 0.
|
inline |
Initialized the sl::Timestamp instance to a number in nanoseconds.
|
inline |
Returns the timestamp in nanoseconds.
|
inline |
Returns the timestamp in microseconds.
|
inline |
Returns the timestamp in milliseconds.
|
inline |
Returns the timestamp in seconds.
|
inline |
Sets the timestamp to a value in nanoseconds.
|
inline |
Sets the timestamp to a value in microseconds.
|
inline |
Sets the timestamp to a value in milliseconds.
|
inline |
Sets the timestamp to a value in seconds.
Copy the value of another sl::Timestamp.
|
inline |
Sets the value of the sl::Timestamp to other_data_ns.
Adds the value of another sl::Timestamp to the current one.
Subtracts the value of another sl::Timestamp to the current one.
Multiplies the value of another sl::Timestamp to the current one.
Divides the value of the current sl::Timestamp by another one.
|
inline |
Convert the sl::Timestamp into a unsigned long long int.
| uint64_t data_ns = 0 |
Timestamp in nanoseconds.
Referenced by Timestamp::getMicroseconds(), Timestamp::getMilliseconds(), Timestamp::getNanoseconds(), Timestamp::getSeconds(), Timestamp::operator unsigned long long int(), Timestamp::operator*=(), Timestamp::operator+=(), Timestamp::operator-=(), Timestamp::operator/=(), sl::operator<(), Timestamp::operator=(), sl::operator==(), Timestamp::setMicroseconds(), Timestamp::setMilliseconds(), Timestamp::setNanoseconds(), and Timestamp::setSeconds().