Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How reliable is Qtimer in some of the older version?
QtWS25 Last Chance

How reliable is Qtimer in some of the older version?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 348 Views
  • 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 Offline
    J Offline
    JohnFrom
    wrote on last edited by
    #1

    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?

    jsulmJ 1 Reply Last reply
    0
    • J JohnFrom

      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?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved