public final class ClockDefaultImpl extends Object implements InternalClock
InternalClock.TimeReachedEvent, InternalClock.TimeReachedJob| Modifier and Type | Field and Description |
|---|---|
static ClockDefaultImpl |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
InternalClock.TimeReachedJob |
createJob(InternalClock.TimeReachedEvent ev)
Creates a job object for the specified event callback.
|
void |
disableJob(InternalClock.TimeReachedJob j)
Disable the job clearing used resources.
|
boolean |
isJobSchedulable()
The clock is capable to execute code when a certain time is reached and before
the time advances further.
|
long |
millis()
Returns the milliseconds since epoch.
|
void |
schedule(InternalClock.TimeReachedJob j,
long _millis)
Schedules or reschedules the timer event job to be run at the
specified point in time.
|
void |
sleep(long _millis)
Wait for the specified amount of time in milliseconds.
|
public static final ClockDefaultImpl INSTANCE
public boolean isJobSchedulable()
InternalClockisJobSchedulable in interface InternalClockpublic InternalClock.TimeReachedJob createJob(InternalClock.TimeReachedEvent ev)
InternalClockcreateJob in interface InternalClockpublic void schedule(InternalClock.TimeReachedJob j, long _millis)
InternalClockschedule in interface InternalClockpublic void disableJob(InternalClock.TimeReachedJob j)
InternalClockdisableJob in interface InternalClockpublic long millis()
InternalClockInternalClock.sleep(long) needs to be called to make time pass by and
make this method return an increased number.millis in interface InternalClockpublic void sleep(long _millis)
throws InterruptedException
InternalClockWhen using a simulated clock either this method or InternalClock.millis() needs to be
called to make time pass and make InternalClock.millis() return an increased number.
sleep in interface InternalClockInterruptedExceptioncache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.