From c7276ca7cfebc39710a0256694e0be2772008082 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Sun, 27 May 2018 16:58:51 +0100 Subject: [PATCH] allow CLOCK_REALTIME too --- nx/source/runtime/newlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx/source/runtime/newlib.c b/nx/source/runtime/newlib.c index 84de6f4e..6c8b3e04 100644 --- a/nx/source/runtime/newlib.c +++ b/nx/source/runtime/newlib.c @@ -47,7 +47,7 @@ void __libnx_init_time(void) { static const u64 nsec_clockres = 1000000000ULL / 19200000ULL; int __libnx_clock_getres(clockid_t clock_id, struct timespec *tp) { - if(clock_id != CLOCK_MONOTONIC) { + if(clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_REALTIME) { errno = EINVAL; return -1; } @@ -63,7 +63,7 @@ int __libnx_clock_getres(clockid_t clock_id, struct timespec *tp) { int __libnx_clock_gettime(clockid_t clock_id, struct timespec *tp) { - if(clock_id != CLOCK_MONOTONIC) { + if(clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_REALTIME) { errno = EINVAL; return -1; }