Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Oct 1999 20:28:35 -0600 (MDT)
From:      Godmar Back <gback@cs.utah.edu>
To:        chris@tourneyland.com
Cc:        freebsd-java@FreeBSD.ORG
Subject:   Re: time measurement in Java
Message-ID:  <199910110228.UAA24017@faith.cs.utah.edu>
In-Reply-To: <3.0.6.32.19991007213913.00857ec0@mail.9netave.net> from "chris@tourneyland.com" at Oct 7, 99 09:39:13 pm

next in thread | previous in thread | raw e-mail | index | archive | help

 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910110228.UAA24017>