mirror of
https://github.com/Maschell/libutils.git
synced 2025-01-15 05:19:07 +01:00
Replace OSMillisecondsToTicks()
with OSMicrosecondsToTicks(1000)
This commit is contained in:
parent
449522d5ed
commit
2a5f6aaa82
@ -13,7 +13,7 @@ void initNetwork(){
|
|||||||
|
|
||||||
s32 recvwait(s32 sock, void *buffer, s32 len) {
|
s32 recvwait(s32 sock, void *buffer, s32 len) {
|
||||||
while(socket_lock) {
|
while(socket_lock) {
|
||||||
OSSleepTicks(OSMillisecondsToTicks(1000));
|
OSSleepTicks(OSMicrosecondsToTicks(1000));
|
||||||
}
|
}
|
||||||
s32 ret;
|
s32 ret;
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
@ -49,7 +49,7 @@ u32 recvword(s32 sock) {
|
|||||||
|
|
||||||
s32 checkbyte(s32 sock) {
|
s32 checkbyte(s32 sock) {
|
||||||
while(socket_lock) {
|
while(socket_lock) {
|
||||||
OSSleepTicks(OSMillisecondsToTicks(1000));
|
OSSleepTicks(OSMicrosecondsToTicks(1000));
|
||||||
}
|
}
|
||||||
unsigned char buffer[1];
|
unsigned char buffer[1];
|
||||||
s32 ret;
|
s32 ret;
|
||||||
@ -63,7 +63,7 @@ s32 checkbyte(s32 sock) {
|
|||||||
|
|
||||||
s32 sendwait(s32 sock, const void *buffer, s32 len) {
|
s32 sendwait(s32 sock, const void *buffer, s32 len) {
|
||||||
while(socket_lock) {
|
while(socket_lock) {
|
||||||
OSSleepTicks(OSMillisecondsToTicks(1000));
|
OSSleepTicks(OSMicrosecondsToTicks(1000));
|
||||||
}
|
}
|
||||||
s32 ret;
|
s32 ret;
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
|
@ -47,7 +47,7 @@ void TCPServer::CloseSockets() {
|
|||||||
|
|
||||||
void TCPServer::ErrorHandling() {
|
void TCPServer::ErrorHandling() {
|
||||||
CloseSockets();
|
CloseSockets();
|
||||||
OSSleepTicks(OSMillisecondsToTicks(1000*1000*2));
|
OSSleepTicks(OSMicrosecondsToTicks(1000*1000*2));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCPServer::DoTCPThreadInternal() {
|
void TCPServer::DoTCPThreadInternal() {
|
||||||
|
@ -35,7 +35,7 @@ void log_print_(const char *str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while(log_lock)
|
while(log_lock)
|
||||||
OSSleepTicks(OSMillisecondsToTicks(1000));
|
OSSleepTicks(OSMicrosecondsToTicks(1000));
|
||||||
log_lock = 1;
|
log_lock = 1;
|
||||||
|
|
||||||
int len = strlen(str);
|
int len = strlen(str);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user