etm.core.timer
Class Java15NanoTimer

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

public class Java15NanoTimer
extends java.lang.Object
implements ExecutionTimer

The Java15NanoTimer uses the new JDK 1.5 System.nanotime.

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

Constructor Summary
Java15NanoTimer()
           
 
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

Java15NanoTimer

public Java15NanoTimer()
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.