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

QElapsedTimer on Linux can use system time instead of monitonic clock

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.7.1
    • Core: Date/Time
    • None
    • Linux/X11

    Description

      Implementation of qt_clock_gettime() (qelapsedtimer_unix.cpp) depends on existing of definition of CLOCK_REALTIME. The cpp-file includes "time.h" and "sys/time.h". Those headers don't contain the definition (Ubuntu 16.04). The definition is included in /usr/include/linux/time.h and is not visible for the cpp-file. But time.h contains extern-declaration for clock_gettime() function. So the code will be compiled, but gettimeofday() will be used on Ubuntu (and maybe other distributives) instead of clock_gettime(CLOCK_MONOTONIC).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Eddy Edward Welbourne
            grin Rinat Gadelshin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes