Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42365

QElapsedTimer::elapsed() inaccurate by up to 1 millisecond

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.5.0
    • 4.8.6, 5.3.2
    • Core: Date/Time
    • None
    • Arch Linux x86
      Intel Pentium 4 3 GHz
    • 51ddaabb81ae55d13aaabfdf45ee7db4d7c9bba2

    Description

      If you compare QElapsedTimer::elapsed() with QElapsedTimer::nsecsElapsed(), you will find QElapsedTimer::elapsed() to be inaccurate by up to 1 millisecond:

      $ ./elapsedtest
      Wait for 53 ms
      QElapsedTimer::elapsed(): 53
      QElapsedTimer::nsecsElapsed(): 53096276
      $ ./elapsedtest
      Wait for 53 ms
      QElapsedTimer::elapsed(): 54
      QElapsedTimer::nsecsElapsed(): 53093277
      $ ./elapsedtest
      Wait for 53 ms
      QElapsedTimer::elapsed(): 53
      QElapsedTimer::nsecsElapsed(): 53094545
      $ ./elapsedtest
      Wait for 53 ms
      QElapsedTimer::elapsed(): 54
      QElapsedTimer::nsecsElapsed(): 53089063
      

      Attachments

        For Gerrit Dashboard: QTBUG-42365
        # Subject Branch Project Status CR V

        Activity

          People

            net147 Jonathan Liu
            net147 Jonathan Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes