etm.core.timer
Class DefaultTimer

java.lang.Object
  extended by etm.core.timer.DefaultTimer
All Implemented Interfaces:
ExecutionTimer

public class DefaultTimer
extends java.lang.Object
implements ExecutionTimer

The DefaultTimer uses System.currentTimeMillis() and will provide fairly coarse grained statistics on the Windows(TM) platform. Don't use this timer on this platform if possible.

Version:
$Revision: 35 $
Author:
void.fm

Constructor Summary
DefaultTimer()
           
 
Method Summary
 long getCurrentTime()
          Returns the current timestamp.
 TimerMetaData getMetaData()
          Returns the timer metadata.
 long getTicksPerSecond()
          Returns the ticks per second which differ between timer implementations.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTimer

public DefaultTimer()
Method Detail

getCurrentTime

public long getCurrentTime()
Description copied from interface: ExecutionTimer
Returns the current timestamp. In combination with ExecutionTimer.getTicksPerSecond() the time in seconds can be calculated.

Specified by:
getCurrentTime in interface ExecutionTimer
Returns:
The timestamp.

getTicksPerSecond

public long getTicksPerSecond()
Description copied from interface: ExecutionTimer
Returns the ticks per second which differ between timer implementations.

Specified by:
getTicksPerSecond in interface ExecutionTimer
Returns:
The ticks per second

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMetaData

public TimerMetaData getMetaData()
Description copied from interface: ExecutionTimer
Returns the timer metadata.

Specified by:
getMetaData in interface ExecutionTimer
Returns:
The timer metadata.


Copyright © 2004,2005, 2006, 2007 void.fm. All Rights Reserved.