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

## com.pearsoneduc.ip.util
Class IntervalTimer

    java.lang.Object
      |
      +--com.pearsoneduc.ip.util.IntervalTimer

public final class IntervalTimer
extends java.lang.Object

A simple class for interval timing.

Version:
  1.3 [1999/02/06]
Author:
  Nick Efford

Constructor Summary
`IntervalTimer()`

Method Summary
`double` | `getElapsedTime()` Calculates elapsed time.
`boolean` | `isStopped()` Indicates whether timer is currently inactive.
`boolean` | `isTiming()` Indicates whether timer is currently active.
`void` | `reset()` Resets the timer.
`void` | `start()` Starts the timer.
`double` | `stop()` Stops the timer (if it is running).
`java.lang.String` | `toString()` Creates a String representation of timer status.

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

Constructor Detail

### IntervalTimer

    public IntervalTimer()

Method Detail

### start

    public void start()

  Starts the timer.

### getElapsedTime

    public double getElapsedTime()

  Calculates elapsed time.
  Returns:
    Current elapsed time in seconds, as a real number

### stop

    public double stop()

  Stops the timer (if it is running).
  Returns:
    Total elapsed time in seconds, as a real number

### reset

    public void reset()

  Resets the timer.

### isTiming

    public boolean isTiming()

  Indicates whether timer is currently active.
  Returns:
    True if the timer is active, false otherwise

### isStopped

    public boolean isStopped()

  Indicates whether timer is currently inactive.
  Returns:
    True if the timer is inactive, false otherwise

### toString

    public java.lang.String toString()

  Creates a String representation of timer status.
  Returns:
    Timer status, as a String
  Overrides:
    toString in class java.lang.Object

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