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

Low Time resolution / time sampling frequenz by QDateTime::currentDateTime()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P4: Low
    • None
    • 4.6.3
    • Core: Date/Time
    • None
    • Windows XP VM
      Windows 7 native
      Qt SDK 2010.04 Windows (4.6.3)

    Description

      The QDateTime::currentDateTime() function misses exact time resolution on windows os.
      The Time output from the following code jumps by 15/16 ms on windows.

      for(int i = 0; i < 100; i++)
      {
          qDebug() << QDateTime::currentDateTime().toString( "dd.MM hh:mm:ss zzz" );
      }
      

      Output on Windows:

      [...]
      "20.04 14:40:21 751"
      "20.04 14:40:21 751"
      "20.04 14:40:21 766"
      "20.04 14:40:21 766"
      [...]
      "20.04 14:40:21 766"
      "20.04 14:40:21 766"
      "20.04 14:40:21 782"
      "20.04 14:40:21 782"
      [...]

      Under Linux (Qt 4.6.3) it works as expected with one ms difference.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            chrisigleich Christian Delis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes