42 #include <sys/ioctl.h> 43 #include <sys/types.h> 47 #include <px4_platform_common/time.h> 129 __EXPORT extern int hrt_set_absolute_time_offset(int32_t time_diff_us);
206 constexpr
hrt_abstime operator "" _s(
unsigned long long seconds)
211 constexpr
hrt_abstime operator "" _ms(
unsigned long long seconds)
216 constexpr
hrt_abstime operator "" _us(
unsigned long long seconds)
struct hrt_call * hrt_call_t
Callout record.
__EXPORT hrt_abstime hrt_store_absolute_time(volatile hrt_abstime *now)
Store the absolute time in an interrupt-safe fashion.
void(* hrt_callout)(void *arg)
Callout function type.
__EXPORT void hrt_call_at(struct hrt_call *entry, hrt_abstime calltime, hrt_callout callout, void *arg)
Call callout(arg) at absolute time calltime.
__EXPORT void hrt_call_after(struct hrt_call *entry, hrt_abstime delay, hrt_callout callout, void *arg)
Call callout(arg) after delay has elapsed.
__EXPORT void hrt_call_init(struct hrt_call *entry)
Initialise a hrt_call structure.
static hrt_abstime hrt_elapsed_time(const hrt_abstime *then)
Compute the delta between a timestamp taken in the past and now.
__EXPORT bool hrt_called(struct hrt_call *entry)
If this returns true, the entry has been invoked and removed from the callout list, or it has never been entered.
__EXPORT void hrt_call_every(struct hrt_call *entry, hrt_abstime delay, hrt_abstime interval, hrt_callout callout, void *arg)
Call callout(arg) after delay, and then after every interval.
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
__EXPORT void hrt_call_delay(struct hrt_call *entry, hrt_abstime delay)
__EXPORT void abstime_to_ts(struct timespec *ts, hrt_abstime abstime)
Convert absolute time to a timespec.
__EXPORT void hrt_init(void)
__EXPORT hrt_abstime ts_to_abstime(const struct timespec *ts)
Convert a timespec to absolute time.
__EXPORT hrt_abstime hrt_absolute_time(void)
Get absolute time in [us] (does not wrap).
__EXPORT void hrt_cancel(struct hrt_call *entry)
Remove the entry from the callout list.
__EXPORT hrt_abstime hrt_elapsed_time_atomic(const volatile hrt_abstime *then)
Compute the delta between a timestamp taken in the past and now.