Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How reliable is Qtimer in some of the older version?

    Mobile and Embedded
    2
    2
    221
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JohnFrom last edited by

      We have an embedded linux machine (quad core, most likely ARM A9 or above) running a Qt program that features a Date & Time display. Nothing fancy, just refresh the date every 1000 ms, and the code is as follows:

      void MDate::onTimeout(void)
      {
          QDateTime currTime  = QDateTime::currentDateTime();
          QDateTime localTime = currTime.addSecs( TimeZone * 3600);
          QDate     date  = localTime.date();
      
          QString  finalDisplayText = "";
         
              finalDisplayText = localTime.toString(format);
         
          finalTimeDisplay->setText(finalDisplayText);
      }
      

      So the basic idea:

      Every time the timer goes to time out (1 second interval), this function gets called and the time is updated.

      Some of our testers report that through long periods of testing, the date could stop updating for DAYS, which is truly, truly absurd.

      I'm not sure which Qt library version the code is using but it's most likely 4.8.1 while the compiler is a freescale version of 4.8.5 possibly customized.

      Any thoughts?

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @JohnFrom last edited by

        @JohnFrom Is everything else working properly when the time is not updated any-more? Does your app write any logs, so you can check whether onTimeout is called or any error/warning messages are there?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post