public class JobSchedulerSystemClock extends Object implements JobSchedulerClock
| Modifier and Type | Field and Description |
|---|---|
static JobSchedulerSystemClock |
INSTANCE |
| Constructor and Description |
|---|
JobSchedulerSystemClock() |
| Modifier and Type | Method and Description |
|---|---|
org.joda.time.DateTime |
now(org.joda.time.DateTimeZone zone)
Returns the current time for the give time zone.
|
org.joda.time.DateTime |
nowUTC()
Returns the current UTC time.
|
void |
sleep(long duration,
TimeUnit unit)
Causes the current execution thread to sleep for the given duration.
|
void |
sleepUninterruptibly(long duration,
TimeUnit unit)
Causes the current execution thread to sleep uninterruptibly for the given duration.
|
public static final JobSchedulerSystemClock INSTANCE
public org.joda.time.DateTime nowUTC()
nowUTC in interface JobSchedulerClockpublic org.joda.time.DateTime now(org.joda.time.DateTimeZone zone)
now in interface JobSchedulerClockpublic void sleep(long duration,
TimeUnit unit)
throws InterruptedException
sleep in interface JobSchedulerClockduration - duration valueunit - duration unitInterruptedExceptionpublic void sleepUninterruptibly(long duration,
TimeUnit unit)
JobSchedulerClocksleepUninterruptibly in interface JobSchedulerClockduration - duration valueunit - duration unitCopyright © 2012–2021 Graylog, Inc.. All rights reserved.