FROM : Gerriet M. Denkmann
DATE : Sat Jul 08 13:00:54 2006
On 08.07.2006, at 08:48, Ed Wynne wrote:
>
> On Jul 8, 2006, at 1:38 AM, Gerriet M. Denkmann wrote:
>> The problem: whenever (B) is initialized from (A) a random value
>> in the range -0.5 ... +0.5 seconds is added to the time.
>> To test: make the time (B) equal to the correct wall clock time.
>> Sleep. Awake. Compare time to wall clock. See difference of
>> -0.5 ... +0.5 seconds.
>
> The hardware clock is probably only second accurate and its likely
> the OS only samples it once, instead of polling for the next second
> increment. This would save about .5s (on average) from the wakeup
> time.
Yes; further proof for this is the fact that the system time after
awakening always starts with a full second (no fractional part).
But: if the OS can poll the hardware clock, why can't I?
Gerriet.
DATE : Sat Jul 08 13:00:54 2006
On 08.07.2006, at 08:48, Ed Wynne wrote:
>
> On Jul 8, 2006, at 1:38 AM, Gerriet M. Denkmann wrote:
>> The problem: whenever (B) is initialized from (A) a random value
>> in the range -0.5 ... +0.5 seconds is added to the time.
>> To test: make the time (B) equal to the correct wall clock time.
>> Sleep. Awake. Compare time to wall clock. See difference of
>> -0.5 ... +0.5 seconds.
>
> The hardware clock is probably only second accurate and its likely
> the OS only samples it once, instead of polling for the next second
> increment. This would save about .5s (on average) from the wakeup
> time.
Yes; further proof for this is the fact that the system time after
awakening always starts with a full second (no fractional part).
But: if the OS can poll the hardware clock, why can't I?
Gerriet.
| Related mails | Author | Date |
|---|---|---|
| Gerriet M. Denkman… | Jul 7, 11:26 | |
| Damien Bobillot | Jul 8, 00:17 | |
| Shawn Erickson | Jul 8, 00:21 | |
| Gerriet M. Denkman… | Jul 8, 07:38 | |
| Ed Wynne | Jul 8, 08:48 | |
| Gerriet M. Denkman… | Jul 8, 13:00 | |
| Ed Wynne | Jul 8, 19:59 |






Cocoa mail archive

