mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-02 09:39:50 -04:00
18 lines
379 B
C
18 lines
379 B
C
#include "sleep.h"
|
|
#include "dolphin/os/OSAlarm.h"
|
|
#include "dolphin/os/OSTimer.h"
|
|
#include "dolphin/os/OSThread.h"
|
|
|
|
void csleep(OSTime c){
|
|
OSMessage msg;
|
|
OSMessageQueue mq;
|
|
OSTimer timer;
|
|
|
|
osCreateMesgQueue(&mq, &msg, 1);
|
|
osSetTimer(&timer, c, 0, &mq, NULL);
|
|
osRecvMesg(&mq, NULL, 1);
|
|
}
|
|
|
|
void msleep(u32 ms){
|
|
csleep((OS_MSEC_TO_TICKS((OSTime)ms)));
|
|
} |