com.threerings.media.timer
Interface MediaTimer

All Known Implementing Classes:
CalibratingTimer, MillisTimer, NanoTimer, PerfTimer

public interface MediaTimer

Provides a pluggable mechanism for delivering high resolution timing information. The timers are not intended to be used by different threads and thus must be protected by synchronization in such circumstances.


Method Summary
 long getElapsedMicros()
          Returns the number of microseconds that have elapsed since the timer was created or last reset().
 long getElapsedMillis()
          Returns the number of milliseconds that have elapsed since the timer was created or last reset().
 void reset()
          Resets the timer's monotonically increasing value.
 

Method Detail

reset

void reset()
Resets the timer's monotonically increasing value.


getElapsedMillis

long getElapsedMillis()
Returns the number of milliseconds that have elapsed since the timer was created or last reset(). Note: the accuracy of this method is highly dependent on the timer implementation used.


getElapsedMicros

long getElapsedMicros()
Returns the number of microseconds that have elapsed since the timer was created or last reset(). Note: the accuracy of this method is highly dependent on the timer implementation used.