diff --git a/src/c/util/time.c b/src/c/util/time.c index 12aec56d0..991934c3b 100644 --- a/src/c/util/time.c +++ b/src/c/util/time.c @@ -10,7 +10,7 @@ #endif /* ifdef WIN32 */ // PX4 -#if defined(__PX4_NUTTX) || defined(__PX4_POSIX) || defined(UCLIENT_PLATFORM_NUTTX) || defined(UCLIENT_PLATFORM_POSIX) +#if defined(__PX4) #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { @@ -71,7 +71,7 @@ int64_t uxr_nanos( struct timespec ts; z_impl_clock_gettime(CLOCK_REALTIME, &ts); return (((int64_t)ts.tv_sec) * 1000000000) + ts.tv_nsec; -#elif defined(__PX4_NUTTX) || defined(__PX4_POSIX) || defined(UCLIENT_PLATFORM_NUTTX) || defined(UCLIENT_PLATFORM_POSIX) +#elif defined(__PX4) return (int64_t)(hrt_absolute_time() * 1000); #else