From 7f8b6af64c2a672490b4fe659e3bad12bd54def1 Mon Sep 17 00:00:00 2001 From: fincs Date: Wed, 29 Aug 2018 22:09:24 +0200 Subject: [PATCH] runtime/newlib.c: use armGetSystemTick instead of svcGetSystemTick --- nx/source/runtime/newlib.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nx/source/runtime/newlib.c b/nx/source/runtime/newlib.c index c1f51426..19c1f0ce 100644 --- a/nx/source/runtime/newlib.c +++ b/nx/source/runtime/newlib.c @@ -8,6 +8,7 @@ #include "../internal.h" #include "types.h" #include "runtime/env.h" +#include "arm/counter.h" #include "kernel/mutex.h" #include "kernel/svc.h" #include "services/fatal.h" @@ -40,7 +41,7 @@ void __libnx_init_time(void) { if (R_FAILED(rc)) { __boottime = UINT64_MAX; } else { - __bootticks = svcGetSystemTick(); + __bootticks = armGetSystemTick(); } } @@ -68,7 +69,7 @@ int __libnx_clock_gettime(clockid_t clock_id, struct timespec *tp) { return -1; } if(tp) { - u64 now=svcGetSystemTick() - __bootticks; + u64 now=armGetSystemTick() - __bootticks; u64 __bootsecs = now / 19200000ULL; @@ -95,7 +96,7 @@ int __libnx_gtod(struct _reent *ptr, struct timeval *tp, struct timezone *tz) { return -1; } - u64 now=svcGetSystemTick() - __bootticks; + u64 now=armGetSystemTick() - __bootticks; u64 __bootsecs = now / 19200000ULL;