Qt Forum

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

    Qt Academy Launch in California!

    What to do about timers when computer goes to sleep mode..?

    General and Desktop
    2
    3
    1041
    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.
    • L
      Leon last edited by

      For example now its 00:20, i want at 00:22 a function to be called.
      so i use seconds until 00:22 which will output 120..

      what about if in that period of time the user sleeps(suspends) the computer?
      i can only guess that the timer will pause. So what should i do? check every second the current time of the system? Is there something specific for this problem?

      1 Reply Last reply Reply Quote 0
      • L
        Leon last edited by

        Noone? :/

        1 Reply Last reply Reply Quote 0
        • JKSH
          JKSH Moderators last edited by

          Please be patient; it has been less than 24 hours since you posted your question.

          Anyway, try it. Does the timer pause?

          If it pauses, one solution is to record the actual time when you want the function to be called. Then, get the timer to fire periodically (say... every 5 seconds?) to check if the time has arrived yet. If it has, call your function.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

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