SM64 Memory Map
|$803223B0||220 bytes||Routine||Global||OSTime osGetTime(void);
void osSetTime(OSTime time);
Calling the osGetTime function returns the time since the last cold reset, expressed in units of CPU count register cycles. Regardless of whether the system is NTSC or PAL, this counter increments at 46.875 MHz, with 1 cycle equal to approximately 21.33 nanoseconds. When the counter reaches its maximum value, it returns to zero and continues to increment. (Since the real time counter has a length of 64 bits, unless the counter value is changed by calling osSetTime it will take more than 10,000 years for the counter to reach its maximum value and return to zero.)
The osSetTime function is used to set the value of the real time counter.
Note that the OSTime type is defined as u64 (unsigned long long), so you should specify "%llu" for the conversion format if you are going to output this type of numerical value with a printf function.
Since the VI Manager performs timer management, you must activate the VI Manager with osCreateViManager before using this function.