mirror of
https://github.com/Maschell/GX2_GUI_Template.git
synced 2024-06-02 15:38:43 +02:00
c7c59554c5
RPX Channel Files
18 lines
472 B
C
18 lines
472 B
C
#include <coreinit/thread.h>
|
|
|
|
|
|
#define BUS_SPEED 248625000
|
|
#define SECS_TO_TICKS(sec) (((unsigned long long)(sec)) * (BUS_SPEED/4))
|
|
#define MILLISECS_TO_TICKS(msec) (SECS_TO_TICKS(msec) / 1000)
|
|
#define MICROSECS_TO_TICKS(usec) (SECS_TO_TICKS(usec) / 1000000)
|
|
|
|
void usleep(unsigned int microsecs)
|
|
{
|
|
OSSleepTicks(MICROSECS_TO_TICKS(microsecs));
|
|
}
|
|
|
|
void sleep(unsigned int secs)
|
|
{
|
|
OSSleepTicks(SECS_TO_TICKS(secs));
|
|
}
|