| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Chris's post indicated that the kernel clock
might not jump. Correct me if I'm wrong on this, but wouldn't the
kernel clock get reset on restart? I definitely want to be able to
continue timing across boots.
To continue timing across restarts, you'll need a persistent timestamp
somewhere, such as a file in the file-system (or NVRAM). All you need is a
correlation between the current GMT time and current kernel time (microsecs
since boot). In other words, GMT time of X can always be correlated to
microseconds-since-boot of Y. The persistent timestamp need only store the
GMT time. Then at any future point you correlate the current
microseconds-since-boot to a corresponding current GMT time and perform
some simple arithmetic.
If the kernel clock does jump, then it's moot.
As long as you're worrying about time across restarts, remember to consider
what happens if the user sets the system time, either manually or via a
network time server. You'll get time-jumps then, too, possibly even a
backwards jump.
| References: | |
| >Re: JNI and NSSelector (From: Greg Guerin <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.