#include <types.h>
◆ Timestamp_t() [1/5]
Timestamp_t::Timestamp_t |
( |
| ) |
|
|
inline |
◆ Timestamp_t() [2/5]
Timestamp_t::Timestamp_t |
( |
int64_t |
secs, |
|
|
uint32_t |
nsecs |
|
) |
| |
|
inline |
Constructor
- Parameters
-
[in] | secs | Seconds |
[in] | nsecs | Nanoseconds |
◆ Timestamp_t() [3/5]
Timestamp_t::Timestamp_t |
( |
const timespec & |
ts | ) |
|
|
inline |
Convert from timespec
- Parameters
-
- Note
- scripts should not use the timespec structure
◆ Timestamp_t() [4/5]
Timestamp_t::Timestamp_t |
( |
const timeval & |
tv | ) |
|
Convert from timeval
- Parameters
-
- Note
- scripts should not use the timeval structure
◆ Timestamp_t() [5/5]
Convert from seconds with fractions
- Parameters
-
[in] | seconds | with fractions |
◆ add() [1/2]
Add another clock time
- Parameters
-
- Returns
- reference to itself
◆ add() [2/2]
Add a seconds with fractions
- Parameters
-
- Returns
- reference to itself
◆ eq() [1/2]
Compare to another clock time
- Parameters
-
- Returns
- true if the same time
◆ eq() [2/2]
Compare to seconds with fractions
- Parameters
-
- Returns
- true if the same time
- Note
- due to pressision, the compare use +-1 nanosecond of value
◆ fromFloat()
Convert from seconds with fractions
- Parameters
-
[in] | seconds | with fractions |
◆ fromNanoseconds()
void Timestamp_t::fromNanoseconds |
( |
uint64_t |
nanoseconds | ) |
|
Convert from nanoseconds
- Parameters
-
◆ less() [1/2]
Compare to another clock time
- Parameters
-
- Returns
- true if smaller then other time
◆ less() [2/2]
Compare to seconds with fractions
- Parameters
-
- Returns
- true if smaller
◆ operator float_seconds()
Convert to seconds with fractions
- Note
- scripts can use the toFloat() method
◆ operator std::string()
Timestamp_t::operator std::string |
( |
| ) |
const |
|
inline |
Convert to string of seconds with fractions
- Note
- scripts can use the string() method
◆ operator timespec()
Timestamp_t::operator timespec |
( |
| ) |
const |
|
inline |
Convert to timespec
- Note
- scripts should not use the timespec structure
◆ operator timeval()
Timestamp_t::operator timeval |
( |
| ) |
const |
|
inline |
Convert to timespec
- Note
- scripts should not use the timeval structure
-
Trunc nanosecods to microseconds Could result zero microseconds from a small nanosecods value
◆ operator+() [1/2]
Add another clock time
- Parameters
-
- Returns
- reference to itself
◆ operator+() [2/2]
Add a seconds with fractions
- Parameters
-
- Returns
- reference to itself
◆ operator+=() [1/2]
Add another clock time
- Parameters
-
- Returns
- reference to itself
◆ operator+=() [2/2]
Add a seconds with fractions
- Parameters
-
- Returns
- reference to itself
◆ operator-() [1/2]
Subtract another clock time
- Parameters
-
- Returns
- reference to itself
◆ operator-() [2/2]
Subtract seconds with fractions
- Parameters
-
- Returns
- reference to itself
◆ operator-=() [1/2]
Subtract another clock time
- Parameters
-
- Returns
- reference to itself
◆ operator-=() [2/2]
Subtract seconds with fractions
- Parameters
-
- Returns
- reference to itself
◆ operator<() [1/2]
bool Timestamp_t::operator< |
( |
const Timestamp_t & |
ts | ) |
const |
|
inline |
Compare to another clock time
- Parameters
-
- Returns
- true if smaller then other time
- Note
- when compare to a number, the number will be converted as seconds with fractions
◆ operator<() [2/2]
Compare to seconds with fractions
- Parameters
-
- Returns
- true if smaller
◆ operator==() [1/2]
bool Timestamp_t::operator== |
( |
const Timestamp_t & |
ts | ) |
const |
|
inline |
Compare to another clock time
- Parameters
-
- Returns
- true if the same time
◆ operator==() [2/2]
Compare to seconds with fractions
- Parameters
-
- Returns
- true if the same time
- Note
- due to pressision, the compare use +-1 nanosecond of value
◆ size()
static size_t Timestamp_t::size |
( |
| ) |
|
|
inlinestatic |
Get object size
- Returns
- object size
◆ string()
std::string Timestamp_t::string |
( |
| ) |
const |
Convert to string
- Returns
- string
◆ subt() [1/2]
Subtract another clock time
- Parameters
-
- Returns
- reference to itself
◆ subt() [2/2]
Subtract seconds with fractions
- Parameters
-
- Returns
- reference to itself
◆ toFloat()
Convert to seconds with fractions
- Returns
- seconds with fractions
◆ toNanoseconds()
uint64_t Timestamp_t::toNanoseconds |
( |
| ) |
const |
Convert to nanoseconds
- Returns
- nanoseconds
◆ toTimespec()
void Timestamp_t::toTimespec |
( |
timespec & |
ts | ) |
const |
|
inline |
Convert to timespec
- Parameters
-
[in,out] | ts | timespec structure |
- Note
- scripts should not use the timespec structure
◆ toTimeval()
void Timestamp_t::toTimeval |
( |
timeval & |
tv | ) |
const |
Convert to timeval
- Parameters
-
[in,out] | tv | timeval structure |
- Note
- scripts should not use the timeval structure
-
Trunc nanosecods to microseconds Could result zero microseconds from a small nanosecods value
◆ nanosecondsField
◆ secondsField
The documentation for this struct was generated from the following file: