Alex Rivera | Logout

Is there any way to get current time in nanoseconds using JavaScript?

Asked 2011-05-14T15:29:57.770
90

So, I know I can get current time in milliseconds using JavaScript. But, is it possible to get the current time in nanoseconds instead?

Edit
Report

1 Answer

5

No. There is not a chance you will get nanosecond accuracy at the JavaScript layer.

If you're trying to benchmark some very quick operation, put it in a loop that runs it a few thousand times.

answered 2011-05-14T15:32:15.367

Your Answer