From owner-freebsd-hackers Wed Jul 17 13:14:19 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 2885B37B400 for ; Wed, 17 Jul 2002 13:14:16 -0700 (PDT) Received: from mail.empirequest.com (www.empirequest.com [216.126.10.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B68743E65 for ; Wed, 17 Jul 2002 13:14:15 -0700 (PDT) (envelope-from spinlock_lists@empirequest.com) Received: (qmail 6665 invoked by uid 89); 17 Jul 2002 20:14:14 -0000 Received: from unknown (HELO fivehundred) (spinlock?lists@empirequest.com@192.168.0.3) by www.empirequest.com with SMTP; 17 Jul 2002 20:14:14 -0000 Message-ID: <004801c22dce$859bfa60$0300a8c0@fivehundred> From: "Andrei Cojocaru" To: "Cy Schubert - CITS Open Systems Group" Cc: References: <200207171943.g6HJhf4o051526@cwsys.cwsent.com> Subject: Re: Counting the clock cycles Date: Wed, 17 Jul 2002 14:14:14 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 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 doesn't fit my criteria since it changes, bah I'll just use gettimeofday = since it's a portable API and hope the computers I run it on don't = change their blocks by too much... ----- Original Message -----=20 From: "Cy Schubert - CITS Open Systems Group" = To: "Andrei Cojocaru" Cc: Sent: Wednesday, July 17, 2002 13:43 Subject: Re: Counting the clock cycles=20 > In message <00d501c22dc4$57d08b00$0200a8c0@twothousand>, "Andrei=20 > Cojocaru" writ > es: > > I was asking around in #freebsdhelp on EFNet what the equivalent of > > GetTickCount() in the Win32 API is in FreeBSD. > >=20 > > I need a way to properly determine passage of time that is not = affected if I > > change the system clock for example. The only way I'm aware that you = can do > > that is by counting the number of clock cycles since system startup. = What > > function does that in FreeBSD? I'd also like a Linux way if = possible. (that > > is a way that will work across all UNIX clones). Thanks and please = include > > my email in the reply directly since I'm not signed up to this = mailing list. > > Thanks once again. >=20 > How about time(3)? >=20 >=20 > -- > Cheers, Phone: 250-387-8437 > Cy Schubert Fax: 250-387-5766 > Team Leader, Sun/Alpha Team Email: Cy.Schubert@osg.gov.bc.ca > Open Systems Group, CITS > Ministry of Management Services > Province of BC =20 > FreeBSD UNIX: cy@FreeBSD.org >=20 >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message