From owner-freebsd-hackers Wed Jul 17 14:45:12 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 AE79137B400 for ; Wed, 17 Jul 2002 14:45:10 -0700 (PDT) Received: from pooh.softalia.com (pooh.softalia.com [65.161.202.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BC2A43E67 for ; Wed, 17 Jul 2002 14:45:09 -0700 (PDT) (envelope-from kkonaka@softalia.com) Received: from tigger.softalia.com (tigger.softalia.com [65.161.202.175]) by pooh.softalia.com (8.9.3+Sun/3.7W-isfs) with ESMTP id RAA07621; Wed, 17 Jul 2002 17:45:00 -0400 (EDT) Received: from roo.softalia.com (IDENT:444-ident-is-a-completely-pointless-protocol-that-offers-no-security-or-traceability-at-all-so-take-this-and-log-it!@roo.softalia.com [10.10.10.4]) by tigger.softalia.com (8.11.4/3.7W-isfs) with ESMTP id g6HLj1t07219; Wed, 17 Jul 2002 17:45:01 -0400 Date: Wed, 17 Jul 2002 17:44:50 -0400 Message-ID: From: kkonaka@mac.com To: freebsd-hackers@FreeBSD.ORG Subject: Re: Counting the clock cycles In-Reply-To: <007801c22dd5$56d2ba50$0300a8c0@fivehundred> References: <007801c22dd5$56d2ba50$0300a8c0@fivehundred> <00d501c22dc4$57d08b00$0200a8c0@twothousand> User-Agent: Wanderlust/2.6.0 (Twist And Shout) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/20.7 (sparc--netbsdelf) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII 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 > I need a way to properly determine passage of time > that is not affected if I change the system clock > for example. how about using setitimer(2) - ITIMER_REAL? since it appears(?) on almost all unix(-like) platforms this expires based only on callout (or jiffies) ticks countdown, and settimeofday(2) never seems to bother adjusting callout queues. kenji To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message