Measuring Milliseconds

support for the ARM toolchain
Post Reply
theodleif
Posts: 1
Joined: Sat Dec 26, 2009 8:14 pm

Measuring Milliseconds

Post by theodleif » Sat Dec 26, 2009 8:27 pm

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

bpoint
Posts: 19
Joined: Wed Nov 07, 2007 4:03 pm
Location: Tokyo, Japan
Contact:

Re: Measuring Milliseconds

Post by bpoint » Thu Jan 28, 2010 10:16 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests