org.razvan.jzx
Class NativeTimer

java.lang.Object
  extended by org.razvan.jzx.NativeTimer

public class NativeTimer
extends java.lang.Object

Obtain high-resolution timing values using a native hardware timer.

Makes use of a JNI library, if possible; if the library does not exist or is not accessible in the current security context (e.g. Applet), default to returning milliseconds from System.currentTimeMillis().

Author:
Razvan Surdulescu (c) 2003 - 2006
You may use and distribute this software for free provided you include this copyright notice. You may not sell this software, use my name for publicity reasons or modify the code without permission from me.

Constructor Summary
NativeTimer()
           
 
Method Summary
static long currentTimeNanos()
          Retrieve the current time, in nanoseconds if possible; if not, return the time in milliseconds, by calling System.currentTimeMillis().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeTimer

public NativeTimer()
Method Detail

currentTimeNanos

public static final long currentTimeNanos()
Retrieve the current time, in nanoseconds if possible; if not, return the time in milliseconds, by calling System.currentTimeMillis().