From owner-freebsd-chat@FreeBSD.ORG Sun Mar 25 21:58:07 2007 Return-Path: X-Original-To: freebsd-chat@freebsd.org Delivered-To: freebsd-chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF72616A403 for ; Sun, 25 Mar 2007 21:58:07 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 5206C13C455 for ; Sun, 25 Mar 2007 21:58:07 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (dialup96.ach.sch.gr [81.186.70.96]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l2PLvcx8026483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 26 Mar 2007 00:57:46 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id l2PLvW1q019138; Mon, 26 Mar 2007 00:57:33 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id l2PLvVVn019121; Mon, 26 Mar 2007 00:57:31 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 26 Mar 2007 00:57:31 +0300 From: Giorgos Keramidas To: deeptech71@gmail.com Message-ID: <20070325215731.GA1517@kobe.laptop> References: <200703251900.l2PJ0Z8w058298@lurza.secnetix.de> <4606D88E.4080503@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4606D88E.4080503@gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.677, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.52, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-chat@freebsd.org Subject: Re: 64bit timestamp X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2007 21:58:07 -0000 On 2007-03-25 22:16, deeptech71@gmail.com wrote: >Oliver Fromme wrote: >> Ideally, two consecutive, non-parallel operations should give >> two different timestamps. That applies to creating or >> touching a file or other kind of resource, or even just >> calling the gettimeofday() function from within the same >> thread, or whatever. In reality that isn't the case today for >> FreeBSD for other reasons, but the timestamp accuracy of UFS2 >> would certainly be sufficient for that. > > Actually, my intend wasn't to use it in filesystems, but > server-client apps, such as games, where 32bit integer timers > must be restarted every 3 weeks That's a bug in the applications themselves. The gettimeofday() call in any modern UNIX returns a `struct timeval', which contains *both* a time_t value of the current time with second-level accuracy and a tv_usec member with millisecond accuracy (or at least an approximation of a timestamp with millisecond accuracy). Any userlevel application which uses userlevel time counters and requires a restart every two or three weeks, because these userlevel timecounters have rolled back to zero, is broken and should be fixed.