Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


oracle.javatools.util
Enum Chronometer.Precision

java.lang.Object
  extended by java.lang.Enum<Chronometer.Precision>
      extended by oracle.javatools.util.Chronometer.Precision

All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Chronometer.Precision>
Enclosing class:
Chronometer

public static enum Chronometer.Precision
extends java.lang.Enum<Chronometer.Precision>

Defines the method to be utilized by a Chronometer instance in order to obtain current time.


Enum Constant Summary
Milliseconds
          Use System.currentTimeMillis() to obtain current time.
Nanoseconds
          Use System.nanoTime() to obtain current time

 

Method Summary
static Chronometer.Precision valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Chronometer.Precision[] 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 Chronometer.Precision Milliseconds
Use System.currentTimeMillis() to obtain current time.

This will usually be the cheapest method.


Nanoseconds

public static final Chronometer.Precision Nanoseconds
Use System.nanoTime() to obtain current time

This method will be more precise than Milliseconds, but it is also likely to be more expensive and more sensitive to low level OS issues, especially regarding clock syncing across multiple cores.

Method Detail

values

public static Chronometer.Precision[] 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 (Chronometer.Precision c : Chronometer.Precision.values())
    System.out.println(c);
Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Chronometer.Precision 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

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


Copyright © 1997, 2013, Oracle. All rights reserved.