Re: Questions about mach_absolute_time
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On May 5, 2008, at 17:38, Jens Alfke wrote: Not that I'm aware of. (1) I believe mach_absolute_time counts the time since system boot. Does that include time spent in sleep/hibernation, or does it stop counting then? Read http://lists.apple.com/archives/PerfOptimization-dev/2006/Jul/msg00024.html concerning that question for a full discussion and investigation on it. The conclusion was that mach_absolute_time increases monotonically and accounts for sleep time on both PowerPC and Intel. See http://lists.apple.com/archives/PerfOptimization-dev/2006/Jul/msg00041.html . In addition, there seemed to be concern on dual-CPU PowerPC machines whereby mach_absolute_time could return different values, and even go backward in time, depending on which CPU it runs on (on PowerPC, according to the thread, each CPU has its own time counter). You may want to take additional steps concerning that, if PowerPC is on your roadmap. If you really need a bullet-proof answer, I'd go dig in the kernel to see how mach_absolute_time is implemented (performance or clock register, some other way), and determine its behavior based on how it is implemented. (2) Is there some kind of notification I can get when there's a discontinuity in the system date, like after an ntpd correction? I remember seeing something like this while skimming the i***** SDK, but haven't seen the equivalent in Mac OS X. -- Disclaimer: the content of this email represents my personal opinions and not those of my employer. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jean-Francois Roy