[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Detection of hibernation wake-up
From:       Thiago Macieira <thiago () kde ! org>
Date:       2008-10-22 18:45:22
Message-ID: 200810222045.29273.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 22 October 2008 14:33:28 David Jarvie wrote:
> > Furthermore, the clock may jump around, both during hibernation and
> > during normal system operation.
>
> Daylight saving time changes are already taken care of. The only other
> likely causes of a jumping clock which I can think of are hibernation or
> NTP adjustments. I suppose that NTP adjustments may also require timers to
> be corrected.
>
> > So, I have to ask: what problem are you trying to solve? Are you sure
> > adjusting alarm times is the correct thing to do?
>
> Currently, the application calculates the time at which the next alarm is
> due, sets a QTimer to expire at that time, and waits until the QTimer
> expires to trigger the alarm. This obviously assumes that the system time
> doesn't jump unpredictably. If the system time isn't predictable (as
> indeed seems to be the case), it will have to check every minute whether
> the next alarm time has been reached.

Given your explanation, there should be no need for adjustments.

Qt already uses the monotonic clock for its timers. That means any time 
resetting does not affect timers: be it NTP or via /usr/bin/date.

Daylight saving time does not affect the clock. It's a timezone issue.

I don't know what happens to the monotonic clock when the system hibernates. 
But one has to wonder if a timer that expired during the hibernation still 
makes sense...

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Software Engineer - Nokia, Qt Software
  Qt Software is hiring - ask me
        PGP/GPG: 0x6EF45358; fingerprint:
        E067 918B B660 DBD1 105C   966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic