public interface InternalClock extends Clock
Modifier and Type | Interface and Description |
---|---|
static interface |
InternalClock.TimeReachedEvent |
static interface |
InternalClock.TimeReachedJob |
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.
|
long millis()
sleep(long)
needs to be called to make time pass by and
make this method return an increased number.void sleep(long _millis) throws InterruptedException
When using a simulated clock either this method or millis()
needs to be
called to make time pass and make millis()
return an increased number.
InterruptedException
boolean isJobSchedulable()
InternalClock.TimeReachedJob createJob(InternalClock.TimeReachedEvent ev)
void schedule(InternalClock.TimeReachedJob j, long _millis)
void disableJob(InternalClock.TimeReachedJob j)
cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.