LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Using MICPOS for timing

Root / Submissions / [.]

12Me21Created:
MICPOS updates twice as often (~2000x per second) as MILLISEC, so it can be used for more accurate timing. There aren't many situations where this is useful, and it's probably not a good idea to rely on this for anything important (apparently it doesn't even work on the Wii U).
XON MIC
MICSTART 3,0,0

'start timer:
VAR FRAMESTART=MICPOS

'...

'end timer:
VAR TIME=MICPOS-FRAMESTART
VAR SECONDS#=TIME/32728
MICPOS is updated after every statement, but always increases by 16, so the actual update rate is limited to sample rate/16, which is at most 32728/16 = 2039.25 times per second. It also can't record times longer than the size of the sample buffer, which is just over 4 seconds at a sample rate of 32728.

hmmmmm....

cool!!!