public interface Time
Modifier and Type | Field and Description |
---|---|
static long |
MS_PER_DAY
Milliseconds per day
|
static long |
MS_PER_HOUR
Milliseconds per hour
|
static long |
MS_PER_SECOND
Milliseconds per second
|
static float |
MS_PER_SECOND_AS_FLOAT
Milliseconds per second (as float)
|
static long |
NS_PER_MS
Nanoseconds per millisecond
|
static long |
NS_PER_SECOND
Nanoseconds per second
|
static float |
NS_PER_SECOND_AS_FLOAT
Nanoseconds per second (as float)
|
static long |
NS_PER_US
Nanoseconds per microsecond
|
static long |
SECONDS_PER_DAY
Seconds per day
|
static long |
SECONDS_PER_HOUR
Seconds per hour
|
static long |
US_PER_MS
Microseconds per millisecond
|
static long |
US_PER_SECOND
Microseconds per second
|
static float |
US_PER_SECOND_AS_FLOAT
Microseconds per second (as float)
|
Modifier and Type | Method and Description |
---|---|
Date |
getCurrentDate()
Get the current date
|
long |
getMicroseconds()
Get the current microseconds
|
long |
getMilliseconds()
Get the current milliseconds
|
long |
getNanoseconds()
Get the current nanoseconds
|
int |
getSeconds()
Get the current seconds
|
void |
sleep(long milliseconds)
Current thread should sleep for some number of milliseconds.
|
static final long US_PER_MS
static final long NS_PER_US
static final long NS_PER_MS
static final long MS_PER_SECOND
static final float MS_PER_SECOND_AS_FLOAT
static final long US_PER_SECOND
static final float US_PER_SECOND_AS_FLOAT
static final long NS_PER_SECOND
static final float NS_PER_SECOND_AS_FLOAT
static final long SECONDS_PER_HOUR
static final long SECONDS_PER_DAY
static final long MS_PER_HOUR
static final long MS_PER_DAY
long getMilliseconds()
long getMicroseconds()
long getNanoseconds()
int getSeconds()
Date getCurrentDate()
void sleep(long milliseconds) throws InterruptedException
milliseconds
- Milliseconds to sleep forInterruptedException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.