From 1b255bfe15ecf3965720b9d39a1fd65d318e95f1 Mon Sep 17 00:00:00 2001 From: shinyquagsire23 Date: Tue, 20 Feb 2018 21:17:11 -0700 Subject: [PATCH] Add usleep --- nx/source/runtime/newlib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nx/source/runtime/newlib.c b/nx/source/runtime/newlib.c index 43463d4b..08238cff 100644 --- a/nx/source/runtime/newlib.c +++ b/nx/source/runtime/newlib.c @@ -53,6 +53,12 @@ int __libnx_gtod(struct _reent *ptr, struct timeval *tp, struct timezone *tz) { return 0; } +int usleep(useconds_t useconds) +{ + svcSleepThread(useconds * 1000ull); + return 0; +} + void newlibSetup(void) { // Register newlib syscalls __syscalls.exit = __libnx_exit;