al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
OS_NSEC_TO_CYCLESFormat#include <ultra64.h> OSTime OS_NSEC_TO_CYCLES(u64 nsecs); Arguments
The number of CPU count register cycles What This Function Does The macros OS_NSEC_TO_CYCLES, OS_USEC_TO_CYCLES, OS_CYCLES_TO_NSEC, and OS_CYCLES_TO_USEC convert to/from CPU Count register cycles from/to nanoseconds or microseconds. OS_NSEC_TO_CYCLES and OS_USEC_TO_CYCLES are cpp(1) macros that respectively convert from nanoseconds and microseconds to CPU Count register cycles. Conversely, OS_CYCLES_TO_NSEC and OS_CYCLES_TO_USEC are macros that respectively convert from CPU Count register cycles to nanoseconds and microseconds. CPU Count register ticks are the units used by the timer services osGetTime and osSetTimer. This counter increments at 46.875 Mhz and each counter tick represents approximately 21.33 nanoseconds. Note that all types are 64-bit quantities, so formatted print functions must use the "%ll" size format to print these values correctly. See Also OS_USEC_TO_CYCLES OS_CYCLES_TO_USEC OS_CYCLES_TO_NSEC osGetCount
|