MS_PER_DAY, MS_PER_HOUR, MS_PER_SECOND, MS_PER_SECOND_AS_FLOAT, NS_PER_MS, NS_PER_SECOND, NS_PER_SECOND_AS_FLOAT, NS_PER_US, SECONDS_PER_DAY, SECONDS_PER_HOUR, US_PER_MS, US_PER_SECOND, US_PER_SECOND_AS_FLOAT
Constructor and Description |
---|
SystemTime() |
Modifier and Type | Method and Description |
---|---|
static Time |
get()
Get an instance (shared) of this object
|
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.
|
public long getMilliseconds()
Time
getMilliseconds
in interface Time
public long getMicroseconds()
Time
getMicroseconds
in interface Time
public long getNanoseconds()
Time
getNanoseconds
in interface Time
public int getSeconds()
Time
getSeconds
in interface Time
public Date getCurrentDate()
Time
getCurrentDate
in interface Time
public void sleep(long milliseconds) throws InterruptedException
Time
sleep
in interface Time
milliseconds
- Milliseconds to sleep forInterruptedException
public static Time get()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.