Page 1 of 1

Measuring Milliseconds

Posted: Sat Dec 26, 2009 8:27 pm
by theodleif
Hello,

I am trying to measure milliseconds on my Nintendo DS. I need them for extracting exact reaction times of a keypress.
As I discovered gettimeofday() doesn't work on NDS. setitime()/getitime() seemed to be a workaround, but although the sys/times.h declares them they are not implemented in the libraries. :cry:

As Google doesn't help further, I am running out of ideas how to achieve this goal.

Can you help me a little?

Thx

Re: Measuring Milliseconds

Posted: Thu Jan 28, 2010 10:16 am
by bpoint
If you haven't figured it out already, you should probably use a hardware timer.

Just set it up at a desired frequency, and read back the register as it increments itself. You don't even need it to generate interrupts if you only need differences between read values.