Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 1999 16:57:41 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        arashfar@sfsu.edu
Cc:        freebsd-java@FreeBSD.ORG
Subject:   Re: time measurement in Java
Message-ID:  <199910072357.QAA88501@bubba.whistle.com>
In-Reply-To: <199910071614.KAA00139@mt.sri.com> from Nate Williams at "Oct 7, 1999 10:14:56 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Nate Williams writes:
> > I would greatly appreciate if you would please give me your advice on
> > which method is better to measure time in Java, or guide me on where to
> > look for it.  In particular, it would be great it can measure time in
> > units less than milliseconds.
> 
> System.currentTimeMillis() and Calendar (don't remember where,maybe
> java.util).  java.util.Date is always a good start.

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..

-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




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