mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Fix HRT abstraction for Mac OS
This commit is contained in:
@@ -86,6 +86,10 @@ static void hrt_unlock(void)
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#define CLOCK_REALTIME 0
|
#define CLOCK_REALTIME 0
|
||||||
|
|
||||||
|
#ifndef CLOCK_MONOTONIC
|
||||||
|
#define CLOCK_MONOTONIC 1
|
||||||
|
#endif
|
||||||
|
|
||||||
int px4_clock_gettime(clockid_t clk_id, struct timespec *tp)
|
int px4_clock_gettime(clockid_t clk_id, struct timespec *tp)
|
||||||
{
|
{
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
|||||||
Reference in New Issue
Block a user