N64® Functions Menu
|
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
|
|
osGetCount
Syntax
#include <ultra64.h>
u32 osGetCount(void);
Explanation
It returns the current value of the MIPS R4300 Count register, a free running counter that increments at half the CPU clock speed. This counter increments at 46.875 Mhz and each counter tick
represents approximately 21.33 nanoseconds. When the counter reaches its
maximum value, it will roll over to zero and continue. Because the counter
is 32 bits long, the counter will wrap approximately every 92 seconds.
See OS_CYCLES_TO_NSEC for useful macros for converting to and from counter cycle time and nanoseconds or microseconds.
The counter value may be used as a pseudo-random number generator or for
short duration timing purposes.
See Also
OS_CYCLES_TO_NSEC
osTvType
osGetTime
|
Nintendo® Confidential
Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998
Nintendo of America Inc. All rights reserved Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1998
|
|