From owner-freebsd-hackers Wed Jul 17 12:43:55 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 E43B737B400 for ; Wed, 17 Jul 2002 12:43:52 -0700 (PDT) Received: from spqr.osg.gov.bc.ca (spqr.osg.gov.bc.ca [142.32.102.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44BC443E72 for ; Wed, 17 Jul 2002 12:43:52 -0700 (PDT) (envelope-from Cy.Schubert@osg.gov.bc.ca) Received: from passer.osg.gov.bc.ca (passer.osg.gov.bc.ca [142.32.110.29]) by spqr.osg.gov.bc.ca (Postfix) with ESMTP id EC2329EE10; Wed, 17 Jul 2002 12:43:46 -0700 (PDT) Received: from cwsys.cwsent.com (cwsys2 [10.1.2.1]) by passer.osg.gov.bc.ca (8.12.3/8.12.3) with ESMTP id g6HJhhP6002982; Wed, 17 Jul 2002 12:43:45 -0700 (PDT) (envelope-from cy@cwsent.com) Received: from cwsys (localhost [127.0.0.1]) by cwsys.cwsent.com (8.12.3/8.12.3) with ESMTP id g6HJhf4o051526; Wed, 17 Jul 2002 12:43:42 -0700 (PDT) (envelope-from cy@cwsys.cwsent.com) Message-Id: <200207171943.g6HJhf4o051526@cwsys.cwsent.com> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 Reply-To: Cy Schubert - CITS Open Systems Group From: Cy Schubert - CITS Open Systems Group X-os: FreeBSD X-Sender: cy@cwsent.com To: "Andrei Cojocaru" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Counting the clock cycles In-Reply-To: Message from "Andrei Cojocaru" of "Wed, 17 Jul 2002 13:01:22 MDT." <00d501c22dc4$57d08b00$0200a8c0@twothousand> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Jul 2002 12:43:41 -0700 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 In message <00d501c22dc4$57d08b00$0200a8c0@twothousand>, "Andrei Cojocaru" writ es: > I was asking around in #freebsdhelp on EFNet what the equivalent of > GetTickCount() in the Win32 API is in FreeBSD. > > 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. How about time(3)? -- 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 FreeBSD UNIX: cy@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message