45 #include <px4_platform_common/log.h> 46 #include <px4_platform_common/time.h> 75 PX4_INFO(
"Elapsed time %llu in 1 sec (usleep)\n", (
unsigned long long)elt);
76 PX4_INFO(
"Start time %llu\n", (
unsigned long long)t);
81 PX4_INFO(
"Elapsed time %llu in 1 sec (sleep)\n", (
unsigned long long)elt);
82 PX4_INFO(
"Start time %llu\n", (
unsigned long long)t);
84 memset(&
t1, 0,
sizeof(
t1));
static int update_interval
High-resolution timer with callouts and timekeeping.
static struct hrt_call t1
__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 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.
static px4::AppState appState
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
static void timer_expired(void *arg)
__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.