High Resolution Timer


clock() in <time.h> has CLOCKS_PER_SEC per second, but I don't know what CLOCKS_PER_SEC is on GP2X.

EDIT: Don't use this, it returns the CPU time used by your program, not the system time. Use gettimeofday() to get microseconds instead. :)
 
If you look at hw addr 0xC0000A00, you can get a timer which increments approx 7,372,800 times per second :)
 
thanks for the info on the TCOUNT timer.

do you know of any code examples of people using it?
I would really appreciate any other tips or info you have on it. having read the magic eyes info I'm not sure if I would be able to set it up correctly but would like to try.
 
Last edited by a moderator:
Back
Top