Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What to do about timers when computer goes to sleep mode..?

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views 1 Watching
  • 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 Offline
    L Offline
    Leon
    wrote on last edited by
    #1

    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
    0
    • L Offline
      L Offline
      Leon
      wrote on last edited by
      #2

      Noone? :/

      1 Reply Last reply
      0
      • JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        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
        0

        • Login

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