From owner-freebsd-java Sun Oct 10 19:28:39 1999 Delivered-To: freebsd-java@freebsd.org Received: from faith.cs.utah.edu (faith.cs.utah.edu [155.99.198.108]) by hub.freebsd.org (Postfix) with ESMTP id 1AA2414C2A for ; Sun, 10 Oct 1999 19:28:37 -0700 (PDT) (envelope-from gback@faith.cs.utah.edu) Received: (from gback@localhost) by faith.cs.utah.edu (8.9.3/8.9.3) id UAA24017; Sun, 10 Oct 1999 20:28:35 -0600 (MDT) From: Godmar Back Message-Id: <199910110228.UAA24017@faith.cs.utah.edu> Subject: Re: time measurement in Java To: chris@tourneyland.com Date: Sun, 10 Oct 1999 20:28:35 -0600 (MDT) Cc: freebsd-java@FreeBSD.ORG In-Reply-To: <3.0.6.32.19991007213913.00857ec0@mail.9netave.net> from "chris@tourneyland.com" at Oct 7, 99 09:39:13 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org FWIW, http://www.cs.utah.edu/~gback/linux-jdk-cyclecounter/ has a class to access the Pentium cycle counter for more precise measurements. Should run under FreeBSD/Elf too. - Godmar > > >System.currentTimeMillis() returns time in milliseconds (obviously). > >I don't think there's any point in measuring time any more precisely, > >because of the slowness and variances in the execution of Java itself. > >More precision would be 'false precision' I think.. > > This is perpetuating a common misconception of Java, that Java is in some > way 'limited'. Java is only as limited as its implementations - and in > fact, it's not even that limited, since there's always the possibility of > native code. > > So here's a better (or at least more complete) answer - the JDK itself > offers no methods for getting more precise time than milliseconds, but > there maybe be a native code library or two that allow you to do better on > FreeBSD. If there are not, it's not to hard to write your own. > > Good luck, > Chris > > > >-Archie > > > >___________________________________________________________________________ > >Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com > > > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org > >with "unsubscribe freebsd-java" in the body of the message > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-java" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message