|
rmw
master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
|
#include <stdint.h>#include "rcutils/time.h"#include "rmw/macros.h"#include "rmw/visibility_control.h"

Go to the source code of this file.
Classes | |
| struct | rmw_time_t |
| A struct representing a duration or relative time in RMW - does not encode an origin. More... | |
Macros | |
| #define | RMW_DURATION_INFINITE {9223372036LL, 854775807LL} |
| Constant representing an infinite duration. Use rmw_time_equal for comparisons. More... | |
| #define | RMW_DURATION_UNSPECIFIED {0LL, 0LL} |
Typedefs | |
| typedef struct RMW_PUBLIC_TYPE rmw_time_t | rmw_time_t |
| A struct representing a duration or relative time in RMW - does not encode an origin. More... | |
| typedef rcutils_time_point_value_t | rmw_time_point_value_t |
| typedef rcutils_duration_value_t | rmw_duration_t |
Functions | |
| bool | rmw_time_equal (const rmw_time_t left, const rmw_time_t right) |
| Check whether two rmw_time_t represent the same time. More... | |
| rmw_duration_t | rmw_time_total_nsec (const rmw_time_t time) |
| Return the total nanosecond representation of a time. More... | |
| rmw_time_t | rmw_time_from_nsec (const rmw_duration_t nanoseconds) |
| Construct rmw_time_t from a total nanoseconds representation. More... | |
| rmw_time_t | rmw_time_normalize (const rmw_time_t time) |
| Ensure that an rmw_time_t does not have nanoseconds > 1 second. More... | |
| #define RMW_DURATION_INFINITE {9223372036LL, 854775807LL} |
Constant representing an infinite duration. Use rmw_time_equal for comparisons.
Different RMW implementations have different representations for infinite durations. This value is reported for QoS policy durations that are left unspecified. Do not directly compare sec == sec && nsec == nsec, because we don't want to be sensitive to non-normalized values (nsec > 1 second) - use rmw_time_equal instead. This value is INT64_MAX nanoseconds = 0x7FFF FFFF FFFF FFFF = d 9 223 372 036 854 775 807
Note: these constants cannot be static const rmw_time_t because in C that can't be used as a compile-time initializer
| #define RMW_DURATION_UNSPECIFIED {0LL, 0LL} |
| typedef struct RMW_PUBLIC_TYPE rmw_time_t rmw_time_t |
A struct representing a duration or relative time in RMW - does not encode an origin.
| bool rmw_time_equal | ( | const rmw_time_t | left, |
| const rmw_time_t | right | ||
| ) |
Check whether two rmw_time_t represent the same time.
| rmw_duration_t rmw_time_total_nsec | ( | const rmw_time_t | time | ) |
Return the total nanosecond representation of a time.
| rmw_time_t rmw_time_from_nsec | ( | const rmw_duration_t | nanoseconds | ) |
Construct rmw_time_t from a total nanoseconds representation.
rmw_time_t only specifies relative time, so the origin is not relevant for this calculation.
| rmw_time_t rmw_time_normalize | ( | const rmw_time_t | time | ) |
Ensure that an rmw_time_t does not have nanoseconds > 1 second.
1.8.17