|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.time.SteppingTimeSource
public class SteppingTimeSource
SteppingTimeSource is a TimeSource that is not real-time. It is instead
based on an internal time accumulator clock.
Time is added to the accumulator using any of the step*() methods.
API Stability: Stable.
Constructor Summary | |
---|---|
SteppingTimeSource()
|
Method Summary | |
---|---|
long |
getNanoseconds()
Provides the number of nanoseconds that have accumulated on this SteppingTimeSource since it's creation. |
boolean |
isRealTime()
Returns false. |
void |
stepMilliseconds(long milliseconds)
Converts to nanoseconds and adds to the internal clock's value. |
void |
stepNanoseconds(long nanoseconds)
Adds to the internal clock's value. |
void |
stepSeconds(double seconds)
Converts to nanoseconds and adds to the internal clock's value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SteppingTimeSource()
Method Detail |
---|
public long getNanoseconds()
getNanoseconds
in interface NanoTimeSource
public boolean isRealTime()
isRealTime
in interface TimeSource
public void stepSeconds(double seconds)
seconds
- the number of seconds to add.public void stepMilliseconds(long milliseconds)
milliseconds
- the number of milliseconds to add.public void stepNanoseconds(long nanoseconds)
nanoseconds
- the number of nanoseconds to add.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |