|
ProgramixGenericLib v5.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.programix.time.DateTools.OffsetTimeSource
public static class DateTools.OffsetTimeSource
Used to specify an offset (positive or negative) from 'now'
that should be used for the DateTools.TimeSource.
| Constructor Summary | |
|---|---|
DateTools.OffsetTimeSource(DateTime startDate)
Create an offset to apply to the real current time. |
|
DateTools.OffsetTimeSource(long offset)
Create an offset to apply to the real current time. |
|
| Method Summary | |
|---|---|
long |
getTime()
Returns the number of milliseconds since 1970-01-01. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateTools.OffsetTimeSource(long offset)
offset - the number of milliseconds to offset the real time
by to create the simulated time. A positive number is an offset
into the future; a negative is an offset into the past.public DateTools.OffsetTimeSource(DateTime startDate)
DateTime passed is the starting time to jump
to as soon as this DateTools.TimeSource takes effect.
startDate - the date to use to calculate the offset from
now.| Method Detail |
|---|
public long getTime()
DateTools.TimeSourceSystem.currentTimeMillis() as the source! This flexibility
allows a VM-wide offset or time acceleration to be implemented.
Keep in mind that if time is accelerated,
wait(long msTimeout) and
Thread.sleep(long msDuration)
times requested throughout the VM will likely last too long.
getTime in interface DateTools.TimeSource
|
ProgramixGenericLib v5.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||