C
coop
I'm trying to port a high-accuracy reaction-time gathering application
from a RTLinux C implementation into a web-avaliable implementation.
We're obviously expecting to lose some accuracy and functionality, but
I need to know exactly how much accuracy we will lose.
So-
1) How accurate and precise are the Date object and setTimeout
function? Do both work off the same clock, and if so, what is the
clock, and is it uniform across most "ordinary" platforms?
2) Is there any other clock or timing resources avaliable within
Javascript?
3) If Javascript isn't the right technology (I'm almost convinced it
isn't, but I'm a lowly undergrad so I do what the boss asks), what
technology would be better suited to:
a) Present a stimulus for a specified amount of time (say 30
ms).
b) Detect user input/keystrokes, and note how long it took for
the user to react to the stimulus in a).
(We want to be within 10ms or so.)
from a RTLinux C implementation into a web-avaliable implementation.
We're obviously expecting to lose some accuracy and functionality, but
I need to know exactly how much accuracy we will lose.
So-
1) How accurate and precise are the Date object and setTimeout
function? Do both work off the same clock, and if so, what is the
clock, and is it uniform across most "ordinary" platforms?
2) Is there any other clock or timing resources avaliable within
Javascript?
3) If Javascript isn't the right technology (I'm almost convinced it
isn't, but I'm a lowly undergrad so I do what the boss asks), what
technology would be better suited to:
a) Present a stimulus for a specified amount of time (say 30
ms).
b) Detect user input/keystrokes, and note how long it took for
the user to react to the stimulus in a).
(We want to be within 10ms or so.)