public interface TimeSource
| Modifier and Type | Method and Description | 
|---|---|
| long | currentTimeMillis() | 
| long | nanoTime() | 
| TimeSource | sleep(long sleepFor,
     java.util.concurrent.TimeUnit unit)Sleep for the given amount of time. | 
| TimeSource | sleepUninterruptibly(long sleepFor,
                    java.util.concurrent.TimeUnit unit)Sleep for the given amount of time uninterruptibly. | 
long currentTimeMillis()
long nanoTime()
This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time.
TimeSource sleepUninterruptibly(long sleepFor, java.util.concurrent.TimeUnit unit)
sleepFor - given amout.unit - time unitTimeSource sleep(long sleepFor, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
sleepFor - given amout.unit - time unitjava.lang.InterruptedExceptionCopyright © 2018 The Apache Software Foundation