From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3E72CCA8.2030605@powell.name> From: Richard Powell User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827 MIME-Version: 1.0 To: 9fans <9fans@cse.psu.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [9fans] timesync is slow to set the time after boot Date: Fri, 14 Mar 2003 22:48:08 -0800 Topicbox-Message-UUID: 80e233cc-eacb-11e9-9e20-41e7f4b1d025 Hello 9fans, I've noticed that timesync takes a minute or so to set the system time from the PC clock after a boot. It seems that it ignores the first sample from the clock and sleeps for a minute before setting the time from a second sample. I've included a diff just to illustrate the issue. Does anyone know the circumstances that led to this? Are there problematic clocks out there:-) Maybe we could restrict the dalay to the cases where it's needed. Thanks, Richard diff -c timesync.org timesync.c.mod *** timesync.org Fri Mar 14 19:42:32 2003 --- timesync.c.mod Fri Mar 14 19:42:32 2003 *************** *** 375,382 **** s->stime = s->ltime + diff; // if the sample was bad or if this is the first sample, ignore it ! if(s->stime < 0 || !already){ ! already = 1; free(s); continue; } --- 375,383 ---- s->stime = s->ltime + diff; // if the sample was bad or if this is the first sample, ignore it ! // if(s->stime < 0 || !already){ ! // already = 1; ! if(s->stime < 0){ free(s); continue; }