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.eclipse.birt.core.util
Class BirtTimer

    java.lang.Object
      org.eclipse.birt.core.util.BirtTimer

    public class BirtTimer

extends java.lang.Object

A timer class used to measure time taken for a specific operation.

Field Summary
`protected long` | `endTime`
`protected long` | `startTime`

Constructor Summary
`BirtTimer()`

Method Summary
`int` | `delta()`
`void` | `logTimeTaken(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String operationName)` writes "{0} takes {1} Milliseconds." to log
`void` | `logTimeTaken(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String id, java.lang.String operationName)` writes "{0} takes {1} Milliseconds." to log
`void` | `restart()` restsrt timer
`void` | `start()` start timer
`void` | `stop()` stops timer

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

Field Detail

### startTime

    protected long startTime

### endTime

    protected long endTime

Constructor Detail

### BirtTimer

    public BirtTimer()

Method Detail

### start

    public void start()

  start timer

### stop

    public void stop()

  stops timer

### delta

    public int delta()

  Returns:
    the time difference between timer start and timer stop

### restart

    public void restart()

  restsrt timer

### logTimeTaken

    public void logTimeTaken(java.util.logging.Logger logger,
                             java.util.logging.Level level,
                             java.lang.String operationName)

  writes "{0} takes {1} Milliseconds." to log

  Parameters:
    `logger` - a Java logger object
    `level` - log level
    `operationName` - the operation name

### logTimeTaken

    public void logTimeTaken(java.util.logging.Logger logger,
                             java.util.logging.Level level,
                             java.lang.String id,
                             java.lang.String operationName)

  writes "{0} takes {1} Milliseconds." to log

  Parameters:
    `logger` - a Java logger object
    `level` - log level
    `id` - task identifier
    `operationName` - the operation name

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

Copyright © 2008 Actuate Corp. All rights reserved.