From 4b2eb055e534a09323c4f5c467aaff63c98dce7c Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Sun, 9 Dec 2018 17:09:23 +0100 Subject: [PATCH] framework: use MONOTONIC for lockstep --- framework/src/Time.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/src/Time.cpp b/framework/src/Time.cpp index a9ecdf6..717f0e5 100644 --- a/framework/src/Time.cpp +++ b/framework/src/Time.cpp @@ -73,7 +73,10 @@ using namespace DriverFramework; int DriverFramework::absoluteTime(struct timespec &ts) { -#if defined(__DF_NUTTX) || defined(__DF_APPLE) +// On NuttX we use CLOCK_REALTIME anyway. +// On macOS we can only use CLOCK_REALTIME unless we're using the lockstep +// scheduler. +#if defined(__DF_NUTTX) || (defined(__DF_APPLE) && !defined(ENABLE_LOCKSTEP_SCHEDULER)) #ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0