Looks like you can't call setInterval() from the onMouseDown event handler. I tried, didn't work.
By John Resig's explanation, this makes sense: http://ejohn.org/blog/how-javascript-timers-work/
So is there any way to measure the difference between the mouse button gets depressed and when it gets released?