etm.core.timer
Class SunHighResTimer

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

public class SunHighResTimer
extends java.lang.Object
implements ExecutionTimer

The SunHighResTimer makes use of undocumented Sun JDK High Performance Timer code.misc.Perf.

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

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

SunHighResTimer

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