• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hardware Clock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hardware Clock


  • Subject: Re: Hardware Clock
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 8 Jul 2006 07:38:44 +0200


On 08.07.2006, at 00:21, Shawn Erickson wrote:

On 7/7/06, Gerriet M. Denkmann <email@hidden> wrote:
How can I read the hardware clock?
(Not the system clock as in NSDate or gettimeofday, but the thing
which keeps the time when the computer is sleeping or turned off).

Maybe some Carbon function? Or Unix call? IOKit?

Not sure I understand the question... can you better explain what you are trying to do?

(A) Well, to my understanding, there is some hardware hidden in my computer which keeps the time when the computer is switched off.


(B) On the other hand, when the computer is running, the CPU keeps the time, which then can be accessed via gettimeofday() or NSDate.

This latter time (B) is initialized from (A) at start or at awakening from sleep.

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.


What I want to achieve:
1. a better understanding of what is going on.
2. reading the time (A)
3. try to eliminate this random change of time after each awakening.

Gerriet.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Hardware Clock
      • From: Ed Wynne <email@hidden>
References: 
 >Hardware Clock (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Hardware Clock (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: [newbie]How to pop a window?
  • Next by Date: Re: How do I display RTF Data?
  • Previous by thread: Re: Hardware Clock
  • Next by thread: Re: Hardware Clock
  • Index(es):
    • Date
    • Thread