mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-15 14:05:06 -05:00
16 lines
275 B
C
16 lines
275 B
C
|
#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;
|
||
|
}
|