mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 10:10:35 +08:00
platforms: use CLOCK_MONOTONIC
For the non-lockstep case we want to use CLOCK_MONOTONIC if possible.
This commit is contained in:
@@ -379,7 +379,8 @@ extern "C" {
|
||||
|
||||
// Get the current time
|
||||
struct timespec ts;
|
||||
// px4_sem_timedwait is implemented using CLOCK_MONOTONIC.
|
||||
// px4_sem_timedwait is implemented using CLOCK_MONOTONIC,
|
||||
// at least for lockstep, on Qurt and on Linux.
|
||||
px4_clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
// Calculate an absolute time in the future
|
||||
|
||||
Reference in New Issue
Block a user