Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public enum TimeUnit
- Object
- Enum<TimeUnit>
- TimeUnit
ImplementsComparable<TimeUnit>
Compile-time API for time units. Runtime implementations come from the host
JDK, Android, TeaVM, or vm/JavaAPI on ParparVM, as with the other CLDC stubs.
Enum constants
NANOSECONDS | |
MICROSECONDS | |
MILLISECONDS | |
SECONDS | |
MINUTES | |
HOURS | |
DAYS |
Methods
Inherited methods
Enum constant details
NANOSECONDS
NANOSECONDSMICROSECONDS
MICROSECONDSMILLISECONDS
MILLISECONDSSECONDS
SECONDSMINUTES
MINUTESHOURS
HOURSDAYS
DAYSMethod details
values
public static TimeUnit[] values()valueOf
public static TimeUnit valueOf(String name)convert
public long convert(long duration, TimeUnit sourceUnit)toNanos
public long toNanos(long duration)toMicros
public long toMicros(long duration)toMillis
public long toMillis(long duration)toSeconds
public long toSeconds(long duration)toMinutes
public long toMinutes(long duration)toHours
public long toHours(long duration)toDays
public long toDays(long duration)timedWait
public void timedWait(Object object, long timeout)
throws InterruptedExceptionThrows
timedJoin
public void timedJoin(Thread thread, long timeout)
throws InterruptedExceptionThrows
sleep
public void sleep(long timeout)
throws InterruptedException