org.compass.core.util.concurrent
Class SystemNanoTimer

java.lang.Object
  extended by org.compass.core.util.concurrent.SystemNanoTimer
All Implemented Interfaces:
NanoTimer

public class SystemNanoTimer
extends Object
implements NanoTimer

Author:
kimchy

Constructor Summary
SystemNanoTimer()
           
 
Method Summary
 long nanoTime()
          Returns the current value of the most precise available system timer, in nanoseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemNanoTimer

public SystemNanoTimer()
Method Detail

nanoTime

public long nanoTime()
Description copied from interface: NanoTimer
Returns the current value of the most precise available system timer, in nanoseconds. This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time. The value returned represents nanoseconds since some fixed but arbitrary time (perhaps in the future, so values may be negative). This method provides nanosecond precision, but not necessarily nanosecond accuracy. No guarantees are made about how frequently values change. Differences in successive calls that span greater than approximately 292 years (263 nanoseconds) will not accurately compute elapsed time due to numerical overflow.

Specified by:
nanoTime in interface NanoTimer
Returns:
The current value of the system timer, in nanoseconds.


Copyright (c) 2004-2006 The Compass Project.