Timestamp Struct Reference

Timesamp representation and utilities. More...

Functions

 Timestamp ()
 Default constructor, inits the Timestamp to 0. More...
 
 Timestamp (uint64_t _data_ns)
 Inits the Timestamp to a number in nanoseconds. More...
 
template<typename T >
 Timestamp (T _data_ns)
 
uint64_t getNanoseconds ()
 Gets the timestamp in nanoseconds. More...
 
uint64_t getMicroseconds ()
 Gets the timestamp in microseconds. More...
 
uint64_t getMilliseconds ()
 Gets the timestamp in milliseconds. More...
 
uint64_t getSeconds ()
 Gets 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 microoseconds. 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...
 
Timestampoperator= (Timestamp other)
 
Timestampoperator= (uint64_t other_data_ns)
 
Timestampoperator+= (const Timestamp &rhs)
 
Timestampoperator-= (const Timestamp &rhs)
 
Timestampoperator*= (const Timestamp &rhs)
 
Timestampoperator/= (const Timestamp &rhs)
 
 operator unsigned long long int () const
 

Attributes

uint64_t data_ns = 0
 Timestamp in nanoseconds. More...
 

Detailed Description

Timesamp representation and utilities.

Constructor and Destructor

◆ Timestamp() [1/3]

Timestamp ( )
inline

Default constructor, inits the Timestamp to 0.

◆ Timestamp() [2/3]

Timestamp ( uint64_t  _data_ns)
inline

Inits the Timestamp to a number in nanoseconds.

◆ Timestamp() [3/3]

Timestamp ( _data_ns)
inline

Functions

◆ getNanoseconds()

uint64_t getNanoseconds ( )
inline

Gets the timestamp in nanoseconds.

◆ getMicroseconds()

uint64_t getMicroseconds ( )
inline

Gets the timestamp in microseconds.

◆ getMilliseconds()

uint64_t getMilliseconds ( )
inline

Gets the timestamp in milliseconds.

◆ getSeconds()

uint64_t getSeconds ( )
inline

Gets the timestamp in seconds.

◆ setNanoseconds()

void setNanoseconds ( uint64_t  t_ns)
inline

Sets the timestamp to a value in nanoseconds.

◆ setMicroseconds()

void setMicroseconds ( uint64_t  t_us)
inline

Sets the timestamp to a value in microoseconds.

◆ setMilliseconds()

void setMilliseconds ( uint64_t  t_ms)
inline

Sets the timestamp to a value in milliseconds.

◆ setSeconds()

void setSeconds ( uint64_t  t_s)
inline

Sets the timestamp to a value in seconds.

◆ operator=() [1/2]

Timestamp& operator= ( Timestamp  other)
inline

◆ operator=() [2/2]

Timestamp& operator= ( uint64_t  other_data_ns)
inline

◆ operator+=()

Timestamp& operator+= ( const Timestamp rhs)
inline

◆ operator-=()

Timestamp& operator-= ( const Timestamp rhs)
inline

◆ operator*=()

Timestamp& operator*= ( const Timestamp rhs)
inline

◆ operator/=()

Timestamp& operator/= ( const Timestamp rhs)
inline

◆ operator unsigned long long int()

operator unsigned long long int ( ) const
inline

Variables

◆ data_ns