Shipwright/soh/src/libultra/os/gettime.c

16 lines
275 B
C
Raw Normal View History

#include "global.h"
OSTime osGetTime(void) {
u32 count;
u32 base;
OSTime t;
register u32 prevInt = __osDisableInt();
count = osGetCount();
base = count - __osBaseCounter;
t = __osCurrentTime;
__osRestoreInt(prevInt);
return base + t;
}