net.vattp.security
Class MicroTime

java.lang.Object
  |
  +--net.vattp.security.MicroTime

public class MicroTime
extends Object

Untamed: Wraps the microsecond timer aspect of Native, but works in a degenerate fashion, using pure Java's System.currentTimeMillis()*1000, if native code is unavailable.

Author:
Mark S. Miller

Field Summary
private static Object nativeStatics
           
 
Constructor Summary
MicroTime()
          Enabled:
 
Method Summary
static void initializeTimer()
          Enabled: Initialize the high-res timer.
static boolean isHiRes()
          Enabled: Find whether we have a high-res timer.
static long queryTimer()
          Enabled: Get the current value of the high-res timer in microseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nativeStatics

private static Object nativeStatics
Constructor Detail

MicroTime

public MicroTime()
Enabled:

Method Detail

initializeTimer

public static void initializeTimer()
Enabled: Initialize the high-res timer.


isHiRes

public static boolean isHiRes()
Enabled: Find whether we have a high-res timer.

Returns:
true if we have a high-res timer, false if we are simulating.

queryTimer

public static long queryTimer()
Enabled: Get the current value of the high-res timer in microseconds.

Returns:
the current value of the high-res timer in microseconds.


comments?