org.xith3d.loop
Enum UpdatingThread.TimingMode

java.lang.Object
  extended by java.lang.Enum<UpdatingThread.TimingMode>
      extended by org.xith3d.loop.UpdatingThread.TimingMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<UpdatingThread.TimingMode>
Enclosing class:
UpdatingThread

public static enum UpdatingThread.TimingMode
extends java.lang.Enum<UpdatingThread.TimingMode>

This enum contains constants to control the timing of this thread.


Enum Constant Summary
MICROSECONDS
           
MILLISECONDS
           
NANOSECONDS
           
 
Method Summary
 double getDivisor()
           
 float getFloatDivisor()
           
 float getFloatMicroFactor()
           
 float getFloatMilliDivisor()
           
 float getFloatNanoFactor()
           
 long getFromMicroSeconds(long t)
           
 long getFromMilliSeconds(long t)
           
 long getFromNanoSeconds(long t)
           
 long getMicroSeconds(long t)
           
 long getMilliDivisor()
           
 long getMilliSeconds(long t)
           
 long getNanoFactor()
           
 long getNanoSeconds(long t)
           
 float getSecondsAsFloat(long t)
           
static UpdatingThread.TimingMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static UpdatingThread.TimingMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MILLISECONDS

public static final UpdatingThread.TimingMode MILLISECONDS

MICROSECONDS

public static final UpdatingThread.TimingMode MICROSECONDS

NANOSECONDS

public static final UpdatingThread.TimingMode NANOSECONDS
Method Detail

values

public static UpdatingThread.TimingMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (UpdatingThread.TimingMode c : UpdatingThread.TimingMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static UpdatingThread.TimingMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getDivisor

public final double getDivisor()
Returns:
the divisor to divide by to get full seconds.

getMilliDivisor

public final long getMilliDivisor()
Returns:
the divisor to divide nanos by to get millis.

getNanoFactor

public final long getNanoFactor()
Returns:
the factor to multiply this by to get nanos.

getFloatDivisor

public final float getFloatDivisor()
Returns:
the divisor to divide by to get full seconds.

getFloatMilliDivisor

public final float getFloatMilliDivisor()
Returns:
the divisor to divide nanos by to get millis.

getFloatMicroFactor

public final float getFloatMicroFactor()
Returns:
the factor to multiply this by to get micros.

getFloatNanoFactor

public final float getFloatNanoFactor()
Returns:
the factor to multiply this by to get nanos.

getMilliSeconds

public final long getMilliSeconds(long t)
Parameters:
t - the input time measured in millis, micros or nanos
Returns:
the corresponding millis

getMicroSeconds

public final long getMicroSeconds(long t)
Parameters:
t - the input time measured in millis, micros or nanos
Returns:
the corresponding micros

getNanoSeconds

public final long getNanoSeconds(long t)
Parameters:
t - the input time measured in millis, micros or nanos
Returns:
the corresponding nanos

getSecondsAsFloat

public final float getSecondsAsFloat(long t)
Parameters:
t - the input time measured in millis, micros or nanos
Returns:
the corresponding seconds as float

getFromMilliSeconds

public final long getFromMilliSeconds(long t)
Parameters:
t - the input time measured in millis
Returns:
the corresponding time units measured in the current TimingMode

getFromMicroSeconds

public final long getFromMicroSeconds(long t)
Parameters:
t - the input time measured in micros
Returns:
the corresponding time units measured in the current TimingMode

getFromNanoSeconds

public final long getFromNanoSeconds(long t)
Parameters:
t - the input time measured in nanos
Returns:
the corresponding time units measured in the current TimingMode