|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.timer.MillisTimer
public class MillisTimer
Implements the MediaTimer interface using System.currentTimeMillis() to obtain
timing information.
Note: System.currentTimeMillis() is notoriously inaccurate on different
platforms. See
bug report 4486109 for more information.
Also note: clock drift on Windows XP is especially pronounced and is exacerbated by the fact that WinXP periodically resyncs the system clock with the hardware clock, causing discontinuous jumps in the progression of time (usually backwards in time).
| Field Summary | |
|---|---|
protected long |
_resetStamp
The time at which this timer was last reset. |
| Constructor Summary | |
|---|---|
MillisTimer()
|
|
| Method Summary | |
|---|---|
long |
getElapsedMicros()
Returns the number of microseconds that have elapsed since the timer was created or last MediaTimer.reset(). |
long |
getElapsedMillis()
Returns the number of milliseconds that have elapsed since the timer was created or last MediaTimer.reset(). |
void |
reset()
Resets the timer's monotonically increasing value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long _resetStamp
| Constructor Detail |
|---|
public MillisTimer()
| Method Detail |
|---|
public void reset()
MediaTimer
reset in interface MediaTimerpublic long getElapsedMillis()
MediaTimerMediaTimer.reset(). Note: the
accuracy of this method is highly dependent on the timer
implementation used.
getElapsedMillis in interface MediaTimerpublic long getElapsedMicros()
MediaTimerMediaTimer.reset(). Note: the
accuracy of this method is highly dependent on the timer
implementation used.
getElapsedMicros in interface MediaTimer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||