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

## org.ensembl.util
Class Timer

    java.lang.Object
      org.ensembl.util.Timer

All Implemented Interfaces:
  java.io.Serializable

public class Timer
extends java.lang.Object
implements java.io.Serializable

Event timer.

See Also:
  Serialized Form

Constructor Summary
`Timer()` Creates timer in non-paranoid mode.
`Timer(boolean paranoid)`

Method Summary
`long` | `getDuration()`
`double` | `getDurationInSecs()`
`static java.lang.String` | `getTimeStamp()` Returns a time + date fromated as string.
`static void` | `main(java.lang.String[] args)`
`Timer` | `start()`
`Timer` | `stop()`
`java.lang.String` | `toString()` Returns duration in seconds.

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

Constructor Detail

### Timer

    public Timer(boolean paranoid)

Parameters:
  `paranoid` - Determines whether an exceptions is thrown if an already running timer is started or a one not running is stopped.

### Timer

    public Timer()

  Creates timer in non-paranoid mode. start() and stop() can be called multiple times without an exception being thrown.

Method Detail

### start

    public Timer start()

### stop

    public Timer stop()
               throws java.lang.RuntimeException

  Throws:
    `java.lang.RuntimeException`

### getDuration

    public long getDuration()

### getDurationInSecs

    public double getDurationInSecs()

### getTimeStamp

    public static java.lang.String getTimeStamp()

  Returns a time + date fromated as string.

### main

    public static void main(java.lang.String[] args)

### toString

    public java.lang.String toString()

  Returns duration in seconds.

  Returns:
    duration in seconds.

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