public interface Clock
Modifier and Type | Method and Description |
---|---|
long |
currentTimeMillis() |
long |
currentTimeNanos() |
long |
sleep(long time,
TimeUnit unit)
Put the current thread to sleep for the time specified.
|
long currentTimeMillis()
long currentTimeNanos()
long sleep(long time, TimeUnit unit) throws InterruptedException
time
- the amount of time to sleep for.unit
- the unit time is measured in.InterruptedException
- if the thread is interrupted during sleep.Copyright © 2010-2016 Stardog Union. All Rights Reserved.