Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.utils.perf
Class Timer

    java.lang.Object
      oracle.ifs.utils.perf.Timer

    public final class Timer

extends java.lang.Object

Simple timing class with support for total elapsed time tracking.

(Unpublished)

Constructor Summary
`Timer()` Construct a new timer and start the time.
`Timer(boolean cumulative)` Construct a new timer that may also track time cumulatively, in addition to just elapsed delta time.

Method Summary
`long` | `getTime()` Returns the delta time in milliseconds.
`long` | `getTotalTime()` Returns the total cumulative time in milliseconds.
`void` | `start()` Start the timer.
`long` | `stop()` Stops the timer, returns delta time in milliseconds.
`java.lang.String` | `toString()` Return the string representation of the delta time and total time, if tracked.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Timer

    public Timer()

  Construct a new timer and start the time. The timer will not track total time. Equivalent to using constructor `Timer(false)`.

  (Unpublished)

### Timer

    public Timer(boolean cumulative)

  Construct a new timer that may also track time cumulatively, in addition to just elapsed delta time.

  Parameters:
    `cumulative` - whether to track total time
  (Unpublished)

Method Detail

### start

    public final void start()

  Description copied from class: `Timer`
  Start the timer. If the timer is already started, it will be reinitialized.

  (Unpublished)

### stop

    public final long stop()

  Description copied from class: `Timer`
  Stops the timer, returns delta time in milliseconds.

  Returns:
    the delta time in milliseconds from the previous start call
  (Unpublished)

### getTime

    public final long getTime()

  Description copied from class: `Timer`
  Returns the delta time in milliseconds.

  Returns:
    the delta time in milliseconds
  (Unpublished)

### getTotalTime

    public final long getTotalTime()

  Description copied from class: `Timer`
  Returns the total cumulative time in milliseconds.

  Returns:
    the total cumulative time in milliseconds
  (Unpublished)

### toString

    public final java.lang.String toString()

  Description copied from class: `Timer`
  Return the string representation of the delta time and total time, if tracked.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the string representation

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD