com.caucho.util
Class CurrentTime

java.lang.Object
  extended by com.caucho.util.CurrentTime

public class CurrentTime
extends java.lang.Object

The CurrentTime class returns the current system time.


Method Summary
static long getCurrentTime()
          Returns the approximate current time in milliseconds.
static long getCurrentTimeActual()
          Gets current time, handling test
static long getExactTime()
          Returns the exact current time in milliseconds.
static long getExactTimeNanoseconds()
          Returns the exact current time in nanoseconds.
static boolean isActive()
           
static boolean isTest()
          Returns true for testing.
static void yieldIfTest()
          Yield if in test mode to maintain ordering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isActive

public static boolean isActive()

getCurrentTime

public static long getCurrentTime()
Returns the approximate current time in milliseconds. Convenient for minimizing system calls.


getCurrentTimeActual

public static long getCurrentTimeActual()
Gets current time, handling test


getExactTime

public static long getExactTime()
Returns the exact current time in milliseconds.


getExactTimeNanoseconds

public static long getExactTimeNanoseconds()
Returns the exact current time in nanoseconds.


isTest

public static boolean isTest()
Returns true for testing.


yieldIfTest

public static void yieldIfTest()
Yield if in test mode to maintain ordering