From owner-freebsd-hackers Fri Jul 19 0: 6:11 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39DF037B400 for ; Fri, 19 Jul 2002 00:06:08 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 2575F43E31 for ; Fri, 19 Jul 2002 00:06:07 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 19 Jul 2002 08:06:06 +0100 (BST) Date: Fri, 19 Jul 2002 08:06:05 +0100 From: David Malone To: Jeremy D'Hoinne Cc: freebsd-hackers@FreeBSD.org Subject: Re: select() behavior when system date changes precisions. Message-ID: <20020719070605.GA60918@walton.maths.tcd.ie> References: <20020718175856.2a5dd923.jeremy.dhoinne@netasq.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020718175856.2a5dd923.jeremy.dhoinne@netasq.com> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jul 18, 2002 at 05:58:56PM +0200, Jeremy D'Hoinne wrote: > I've forgottent to precise that servers involved use thread library > (compilation with -pthread flag) Ahhh - this may explain what you are seeing - I think that the threaded library uses gettimeofday, which would see the time going backwards. The non-threaded version of select uses a kernel "getmicrouptime" call, which shouldn't have this problem. It is possible a getuptime call might be useful for people implimenting things like the threading library. OTOH, there is usually no need to step the clock backwards on FreeBSD after boot. Because get gettimeofday returns the time in UTC there will be no jump for daylight savings. The only remaining problem are leap seconds, which don't happen very often. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message