nros C API
Lightweight ROS 2 client for embedded real-time systems
Loading...
Searching...
No Matches
timer.h
Go to the documentation of this file.
1
10#ifndef NROS_TIMER_H
11#define NROS_TIMER_H
12
13/* Type and function definitions live in <rclc/detail/nros_generated.h>.
14 * This per-module header is kept as a thin shim so existing code that
15 * does `#include <rclc/timer.h>` continues to compile. */
16#include "rclc/types.h"
17
78static inline rcl_ret_t rcl_difference_times(const struct rclc_time_t* start,
79 const struct rclc_time_t* finish,
80 struct rcl_duration_t* delta) {
81 if (start == NULL || finish == NULL || delta == NULL) {
83 }
84 /* Both decodes go through the exported entry point; see the note above on
85 * why neither the decode nor the encode is spelled out here. */
88 return RCL_RET_OK;
89}
90
91#endif /* NROS_TIMER_H */
92
93/* Every upstream-path header carries the whole C API, as `<rclc/rclc.h>` does
94 * (phase-492): a ported file that includes only `<rclc/timer.h>` still finds
95 * `RCLC_CHECK_RET`, `RCLC_LOG_*` and the rcl spellings. Outside the guard, so
96 * this header's own declarations are complete before the umbrella reads them. */
97#include "rclc/rclc.h"
#define RCL_RET_OK
Definition nros_generated.h:2965
#define RCL_RET_INVALID_ARGUMENT
Definition nros_generated.h:2980
int64_t rclc_time_to_nanoseconds(const struct rclc_time_t *time)
struct rcl_duration_t rclc_duration_from_nanoseconds(int64_t nanoseconds)
int rcl_ret_t
Definition nros_generated.h:903
Umbrella header for the nano-ros C API, at upstream's path.
Definition nros_generated.h:922
Definition nros_generated.h:908
static rcl_ret_t rcl_difference_times(const struct rclc_time_t *start, const struct rclc_time_t *finish, struct rcl_duration_t *delta)
Compute the duration between two time points: finish - start.
Definition timer.h:78
Shared types and constants for the nros C API.