Question T5765
Visible to All Users

Survey Timer precision

created 5 years ago

Is there any way to get the time in more precise measurements? (milliseconds, or some other fraction of a second)

If this is not an option now, will you please consider adding it in a future release? I'd appreciate some higher precision in my test data

Answers approved by surveyjs Support

created 5 years ago

Hello,

Could you please specify - what timer are you talking about?
If you are talking about the timeout in quiz, then what is your business case?
It's almost impossible to answer on even one question in less than a second …

You also should take in account JavsScript timeout/interval methods natural inaccuracy, see this thread for more details - https://stackoverflow.com/questions/21097421/what-is-the-reason-javascript-settimeout-is-so-inaccurate

Thanks, Serge
SurveyJS Team

    Comments (2)
    N N
    Nadav Gur-Arieh 5 years ago

      I'm talking about measuring the time spent on each page / the survey
      What i mean is that when I activate survey.startTimer() and then when I get the time from either survey.timeSpent() or page.timeSpent() is there anyway to get more precise measurements other than seconds? and if there isn't I'd like you to know that such a feature would be appreciated. dates and times in js are measured in milliseconds after all

      and I'm aware that no one can answer a question in less than a second, but testing how fast a million people can answer a given question, even seeing a difference between 6.9 seconds and 6.1 seconds is important

        Hello,

        You can subscribe the https://surveyjs.io/Documentation/Library?id=surveymodel#onCurrentPageChanged event and measure time spent by your user

        Thanks, Serge
        SurveyJS Team