TimePoint represents a moment in time with nanoseconds precision.
More...
#include <TimePoint.hpp>
TimePoint represents a moment in time with nanoseconds precision.
@safety_api_struct
◆ from_ms()
| static constexpr TimePoint eprosima::safedds::execution::TimePoint::from_ms |
( |
uint64_t |
ms | ) |
|
|
inlinestaticconstexprnoexcept |
Create a TimePoint from milliseconds.
- Parameters
-
- Returns
- TimePoint with the given milliseconds.
◆ from_us()
| static constexpr TimePoint eprosima::safedds::execution::TimePoint::from_us |
( |
uint64_t |
us | ) |
|
|
inlinestaticconstexprnoexcept |
Create a TimePoint from microseconds.
- Parameters
-
- Returns
- TimePoint with the given microseconds.
◆ min()
Static min operator.
- Parameters
-
| first | Left hand side of the operator |
| second | Right hand side of the operator |
- Returns
- The minimum of both timepoints
◆ normalize()
| TimePoint eprosima::safedds::execution::TimePoint::normalize |
( |
| ) |
const |
|
noexcept |
Normalize the TimePoint to handle nanoseconds overflow.
- Note
- This method handles negative TimePoints as TIME_INVALID.
-
This method handles TimePoints greater than TIME_MAX_REPRESENTABLE as TIME_INFINITE.
- Returns
- Normalized TimePoint.
◆ to_ms()
| constexpr int64_t eprosima::safedds::execution::TimePoint::to_ms |
( |
| ) |
const |
|
inlineconstexprnoexcept |
To milliseconds conversion.
- Returns
- Milliseconds in a 64-bit integer.
◆ to_us()
| constexpr int64_t eprosima::safedds::execution::TimePoint::to_us |
( |
| ) |
const |
|
inlineconstexprnoexcept |
To microseconds conversion.
- Returns
- Microseconds in a 64-bit integer.
◆ CDR_SERIALIZED_SIZE
| constexpr uint32_t eprosima::safedds::execution::TimePoint::CDR_SERIALIZED_SIZE |
|
staticconstexpr |
Initial value:=
portable::safe_sizeof<int32_t>() +
portable::safe_sizeof<uint32_t>()
CDR serialized size.
◆ nanoseconds
| uint32_t eprosima::safedds::execution::TimePoint::nanoseconds |
◆ seconds
| int32_t eprosima::safedds::execution::TimePoint::seconds |
Seconds since UNIX prime epoch (0h, 1 January 1970).
The documentation for this struct was generated from the following file:
- build/docs/user_manual/v3.0.0/tmp/include/safedds/execution/TimePoint.hpp