site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=KScYbtr84nCe3nuPZx2vTWCz9BNuyDQ4FXutgXcY28ZK+eb/PSdohNdchVHq2s1Zzzo786A6/trghM0Kqn9klYF9OwKTwBEtI6GJCym9cH6H/LU2gSe2YQPshzEJb5hhmnhV6yUlFmgTF+QmIXnOuxi8HGbfedMNEFcl/wjyaeE= On Sat, 8 Jan 2005 00:59:17 -0500, Karl Magdsick <kmagnum@gmail.com> wrote:
If you want to get a clock error estimate from within the kernel, what do you want to use as your reference clock?
I have a CDMA clock plugged into a third-party of my XServe, that I have confirmed accuracy on. I also have a number of other stratum 1 NTP clocks that ntpd is peering with.
The NTP error estimate is based on clock skew, which requires two clocks. It would appear that this would require porting an NTP (or other protocol to query remote clocks) client into kernel space or else writing some user-space code to implement/utilize an NTP client and pass the information to the kernel. Jitter between the CPU clock and the BIOS clock is not sufficient for this purpose.
Ah, so this comes back to really just needing the ntp_adjtime() call to work, because whatever I implement will need to talk to ntpd? Do you have any advice to massaging the kern_ntptime.c and timex.h files from FreeBSD into something that will function properly on Darwin? Thanks, Sean
-Karl
On Fri, 7 Jan 2005 13:26:31 -0800, Sean Peisert <peisert@gmail.com> wrote:
I was wondering if there is a way to get the current time of the day it is on the system from within a kernel extension I am writing.
You can follow the code for gettimeofday() and just call
Is there an equivalent to this for getting the error estimate that ntp_adjtime() gives?
-- Sean Peisert http://www.sdsc.edu/~peisert/
-- Sean Peisert (858) 822-3685 (voice) peisert@sdsc.edu (858) 822-5443 (fax) http://www.sdsc.edu/~peisert/ Fellow, San Diego Supercomputer Center University of California, San Diego 9500 Gilman Drive, MC 0505 La Jolla, CA 92093-0505 _______________________________________________ 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)
-
Sean Peisert