Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8555691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:10:55+00:00 2026-06-11T15:10:55+00:00

Can anyone give advice as to the accuracy and precision of timing in JavaScript?

  • 0

Can anyone give advice as to the

accuracy and precision of timing in JavaScript?

I need to time user responses with a calculated accuracy and precision.

Date().getTime

was the function I was thinking about using to make measurements. I imagine the accuracy is near perfect, but I want to calculate the precision.

I want to emulate a user using setTimeout() so I can calculate precision of getTime().

setTimeOut()

Do these two functions use the same clock? If one varies say +10msec will the other as well effectively making my experiment to calculate precision useless?

Someone already did this:

http://ejohn.org/blog/accuracy-of-javascript-time/

Resolution Information

https://bugzilla.mozilla.org/show_bug.cgi?id=363258

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:10:56+00:00Added an answer on June 11, 2026 at 3:10 pm

    You should read this article. It talks about the new High resolution Timer and compares it with the current Date object.

    Date.now()         //  1337376068250
    performance.now()  //  20303.427000007
    

    Basically there are two key points:

    1. performance.now() is a measurement of floating point milliseconds since that particular page started to load

    2. Perhaps less often considered is that Date, based on system time, isn’t ideal for real user monitoring either. Most systems run a daemon which regularly synchronizes the time. It is common for the clock to be tweaked a few milliseconds every 15-20 minutes. At that rate about 1% of 10 second intervals measured would be inaccurate.

    With Date you’ll get miliseconds resolution, though the accuracy of it is not guaranteed. According to the High resolution Timer specs:

    For certain tasks this definition of time may not be sufficient as it does not allow for sub-millisecond resolution and is subject to system clock skew.

    I’d recommend you read both articles to get a clearer idea about this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone give me any advice on setting up the ability for a user
Can anyone give advice, or point to any guides, on how to manage a
can anyone give me any advice on what to do about this error ?!
Can anyone give me advice on where to start when it comes to setting
Can anyone give me any advice or direct me to a good tutorial on
Can anyone give advice on filtering my Elmah ( http://code.google.com/p/elmah/ ) exception logs? Elmah
Can anyone give me some advice as to how to clean up a string
Can anyone give me an example of these attributes in action: stroke-dasharray, stroke-linecap, stroke-linejoin
Can anyone give tell me how to search for a particular word in a
Can anyone give me any pointers. I have a text file that contains dates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.