This commit is contained in:
Kartik 2018-06-13 12:55:08 +00:00 committed by GitHub
commit b14884130f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -164,11 +164,8 @@ void osSetSpeedupEnable(bool enable)
__ctru_speedup_config();
}
int usleep(useconds_t useconds)
int __libctru_nanosleep(const struct timespec *req, struct timespec *rem)
{
svcSleepThread(useconds * 1000ull);
svcSleepThread(req->tv_sec * 1000000000ull + req->tv_nsec);
return 0;
}

View File

@ -12,6 +12,7 @@
void __ctru_exit(int rc);
int __libctru_gtod(struct _reent *ptr, struct timeval *tp, struct timezone *tz);
int __libctru_nanosleep(const struct timespec *req, struct timespec *rem);
extern const u8 __tdata_lma[];
extern const u8 __tdata_lma_end[];
@ -34,6 +35,7 @@ void __system_initSyscalls(void)
__syscalls.exit = __ctru_exit;
__syscalls.gettod_r = __libctru_gtod;
__syscalls.getreent = __ctru_get_reent;
__syscalls.nanosleep = __libctru_nanosleep;
// Register locking syscalls
__syscalls.lock_init = LightLock_Init;