From 2a5f6aaa828159e0657406f5473c6a749361af4b Mon Sep 17 00:00:00 2001 From: Maschell Date: Mon, 18 Jun 2018 22:08:39 +0200 Subject: [PATCH] Replace `OSMillisecondsToTicks()` with `OSMicrosecondsToTicks(1000)` --- src/network/net.c | 6 +++--- src/utils/TCPServer.cpp | 2 +- src/utils/logger.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/network/net.c b/src/network/net.c index b097039..9ce8bc1 100644 --- a/src/network/net.c +++ b/src/network/net.c @@ -13,7 +13,7 @@ void initNetwork(){ s32 recvwait(s32 sock, void *buffer, s32 len) { while(socket_lock) { - OSSleepTicks(OSMillisecondsToTicks(1000)); + OSSleepTicks(OSMicrosecondsToTicks(1000)); } s32 ret; while (len > 0) { @@ -49,7 +49,7 @@ u32 recvword(s32 sock) { s32 checkbyte(s32 sock) { while(socket_lock) { - OSSleepTicks(OSMillisecondsToTicks(1000)); + OSSleepTicks(OSMicrosecondsToTicks(1000)); } unsigned char buffer[1]; s32 ret; @@ -63,7 +63,7 @@ s32 checkbyte(s32 sock) { s32 sendwait(s32 sock, const void *buffer, s32 len) { while(socket_lock) { - OSSleepTicks(OSMillisecondsToTicks(1000)); + OSSleepTicks(OSMicrosecondsToTicks(1000)); } s32 ret; while (len > 0) { diff --git a/src/utils/TCPServer.cpp b/src/utils/TCPServer.cpp index 48416ba..bf4d965 100644 --- a/src/utils/TCPServer.cpp +++ b/src/utils/TCPServer.cpp @@ -47,7 +47,7 @@ void TCPServer::CloseSockets() { void TCPServer::ErrorHandling() { CloseSockets(); - OSSleepTicks(OSMillisecondsToTicks(1000*1000*2)); + OSSleepTicks(OSMicrosecondsToTicks(1000*1000*2)); } void TCPServer::DoTCPThreadInternal() { diff --git a/src/utils/logger.c b/src/utils/logger.c index db8203f..ed95731 100644 --- a/src/utils/logger.c +++ b/src/utils/logger.c @@ -35,7 +35,7 @@ void log_print_(const char *str) { } while(log_lock) - OSSleepTicks(OSMillisecondsToTicks(1000)); + OSSleepTicks(OSMicrosecondsToTicks(1000)); log_lock = 1; int len = strlen(str);