public class TimeServices extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TimeServices.ScheduledExecutor |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
useActualTime |
| Constructor and Description |
|---|
TimeServices() |
| Modifier and Type | Method and Description |
|---|---|
static long |
currentTimeMillis() |
static void |
moveTimeForward(long timeDeltaNsec) |
static void |
moveTimeForwardMsec(long timeDeltaMsec) |
static long |
nanoTime() |
static void |
setCurrentTime(long newCurrentTime) |
static void |
sleepMsecs(long sleepTimeMsec) |
static void |
sleepNanos(long sleepTimeNsec) |
static void |
waitUntilTime(long timeToWakeAt) |
public static long nanoTime()
public static long currentTimeMillis()
public static void sleepMsecs(long sleepTimeMsec)
public static void sleepNanos(long sleepTimeNsec)
public static void waitUntilTime(long timeToWakeAt)
throws InterruptedException
InterruptedExceptionpublic static void moveTimeForward(long timeDeltaNsec)
throws InterruptedException
InterruptedExceptionpublic static void moveTimeForwardMsec(long timeDeltaMsec)
throws InterruptedException
InterruptedExceptionpublic static void setCurrentTime(long newCurrentTime)
throws InterruptedException
InterruptedExceptionCopyright © 2015. All rights reserved.