mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 08:51:37 +08:00
Support 10.11 and 10.12 in parallel in PX4
This commit is contained in:
committed by
Lorenz Meier
parent
f49eabdb9d
commit
af8cbee6d5
@@ -93,7 +93,32 @@ static void hrt_unlock(void)
|
||||
px4_sem_post(&_hrt_lock);
|
||||
}
|
||||
|
||||
#if defined(__QURT)
|
||||
#if defined(__PX4_APPLE_LEGACY)
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
int px4_clock_gettime(clockid_t clk_id, struct timespec *tp)
|
||||
{
|
||||
struct timeval now;
|
||||
int rv = gettimeofday(&now, NULL);
|
||||
|
||||
if (rv) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
tp->tv_sec = now.tv_sec;
|
||||
tp->tv_nsec = now.tv_usec * 1000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int px4_clock_settime(clockid_t clk_id, struct timespec *tp)
|
||||
{
|
||||
/* do nothing right now */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#elif defined(__QURT)
|
||||
|
||||
#include "dspal_time.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user