public class Time extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Time.SimulatedTime |
Constructor and Description |
---|
Time() |
Modifier and Type | Method and Description |
---|---|
static void |
advanceTime(long ms) |
static void |
advanceTimeNanos(long nanos) |
static void |
advanceTimeSecs(long secs) |
static long |
currentTimeMillis() |
static int |
currentTimeSecs() |
static long |
deltaMs(long timeInMilliseconds) |
static int |
deltaSecs(int timeInSeconds) |
static boolean |
isSimulating() |
static boolean |
isThreadWaiting(Thread t) |
static long |
millisToNanos(long millis) |
static long |
nanosToMillis(long nanos) |
static long |
nanoTime() |
static void |
parkNanos(long nanos) |
static long |
secsToMillis(int secs) |
static long |
secsToMillisLong(double secs) |
static void |
sleep(long ms) |
static void |
sleepSecs(long secs) |
static void |
sleepUntil(long targetTimeMs) |
static void |
sleepUntilNanos(long targetTimeNanos) |
public static boolean isSimulating()
public static void sleepUntil(long targetTimeMs) throws InterruptedException
InterruptedException
public static void sleepUntilNanos(long targetTimeNanos) throws InterruptedException
InterruptedException
public static void sleep(long ms) throws InterruptedException
InterruptedException
public static void parkNanos(long nanos) throws InterruptedException
InterruptedException
public static void sleepSecs(long secs) throws InterruptedException
InterruptedException
public static long nanoTime()
public static long currentTimeMillis()
public static long nanosToMillis(long nanos)
public static long millisToNanos(long millis)
public static long secsToMillis(int secs)
public static long secsToMillisLong(double secs)
public static int currentTimeSecs()
public static int deltaSecs(int timeInSeconds)
public static long deltaMs(long timeInMilliseconds)
public static void advanceTime(long ms)
public static void advanceTimeNanos(long nanos)
public static void advanceTimeSecs(long secs)
public static boolean isThreadWaiting(Thread t)
Copyright © 2023 The Apache Software Foundation. All rights reserved.