Enum Class TTimeUnit

java.lang.Object
java.lang.Enum<TTimeUnit>
org.teavm.classlib.java.util.concurrent.TTimeUnit
All Implemented Interfaces:
Serializable, Comparable<TTimeUnit>, Constable

public enum TTimeUnit extends Enum<TTimeUnit>
  • Enum Constant Details

    • NANOSECONDS

      public static final TTimeUnit NANOSECONDS
    • MICROSECONDS

      public static final TTimeUnit MICROSECONDS
    • MILLISECONDS

      public static final TTimeUnit MILLISECONDS
    • SECONDS

      public static final TTimeUnit SECONDS
    • MINUTES

      public static final TTimeUnit MINUTES
    • HOURS

      public static final TTimeUnit HOURS
    • DAYS

      public static final TTimeUnit DAYS
  • Method Details

    • values

      public static TTimeUnit[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TTimeUnit valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • convert

      public long convert(long sourceDuration, TTimeUnit 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 obj, long timeout) throws InterruptedException
      Throws:
      InterruptedException
    • timedJoin

      public void timedJoin(Thread thread, long timeout) throws InterruptedException
      Throws:
      InterruptedException
    • sleep

      public void sleep(long timeout) throws InterruptedException
      Throws:
      InterruptedException