1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 22:44:30 +00:00

[ntsc-1.2] Update spec for boot and code (#2114)

* Update spec for boot and code

* Fix merge
This commit is contained in:
cadmic 2024-09-03 21:30:23 -07:00 committed by GitHub
parent c8cafdc93e
commit 6e5ea8c7aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 12 deletions

View file

@ -1,28 +0,0 @@
#include "global.h"
void Sleep_Cycles(OSTime cycles) {
OSMesgQueue mq;
OSMesg msg;
OSTimer timer;
osCreateMesgQueue(&mq, &msg, 1);
osSetTimer(&timer, cycles, 0, &mq, NULL);
osRecvMesg(&mq, NULL, OS_MESG_BLOCK);
}
void Sleep_Nsec(u32 nsec) {
Sleep_Cycles(OS_NSEC_TO_CYCLES(nsec));
}
void Sleep_Usec(u32 usec) {
Sleep_Cycles(OS_USEC_TO_CYCLES(usec));
}
// originally "msleep"
void Sleep_Msec(u32 ms) {
Sleep_Cycles((ms * OS_CPU_COUNTER) / 1000ull);
}
void Sleep_Sec(u32 sec) {
Sleep_Cycles(sec * OS_CPU_COUNTER);
}