setInterval() can give you a precise millisecond count.

gparis