public static final class TimeSource.CurrentTimeSource extends TimeSource
System.currentTimeMillis()
.TimeSource.CurrentTimeSource, TimeSource.NanoTimeSource, TimeSource.SimTimeSource
CURRENT_TIME, NANO_TIME
Constructor and Description |
---|
CurrentTimeSource() |
Modifier and Type | Method and Description |
---|---|
long |
convertDelay(TimeUnit fromUnit,
long value,
TimeUnit toUnit) |
long |
getTime()
Return a time value, in nanosecond unit.
|
void |
sleep(long ms) |
get
public long getTime()
TimeSource
getTime
in class TimeSource
public void sleep(long ms) throws InterruptedException
sleep
in class TimeSource
InterruptedException
public long convertDelay(TimeUnit fromUnit, long value, TimeUnit toUnit)
convertDelay
in class TimeSource
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.