From 030f28a6fb5d657dab941a6f068b679334b73fc4 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Fri, 2 Apr 2021 08:56:24 +0000 Subject: [PATCH] Bug 1686405 - Fix tier-3 build. r=glandium DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D109492 --- mozglue/misc/Uptime.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mozglue/misc/Uptime.cpp b/mozglue/misc/Uptime.cpp index bded4017ec13..bf1348199e49 100644 --- a/mozglue/misc/Uptime.cpp +++ b/mozglue/misc/Uptime.cpp @@ -43,9 +43,7 @@ Maybe NowIncludingSuspendMs() { return Some(clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW) / kNSperMS); } -#endif // macOS - -#if defined(XP_WIN) +#elif defined(XP_WIN) // Number of hundreds of nanoseconds in a millisecond static constexpr uint64_t kHNSperMS = 10000; @@ -77,9 +75,8 @@ Maybe NowIncludingSuspendMs() { pQueryInterruptTime(&interrupt_time); return Some(interrupt_time / kHNSperMS); } -#endif // XP_WIN -#if defined(XP_LINUX) // including Android +#elif defined(XP_LINUX) // including Android # include // Number of nanoseconds in a millisecond. @@ -111,7 +108,12 @@ Maybe NowIncludingSuspendMs() { # endif } -#endif // XP_LINUX +#else // catch all + +Maybe NowExcludingSuspendMs() { return Nothing(); } +Maybe NowIncludingSuspendMs() { return Nothing(); } + +#endif }; // anonymous namespace