Packages

object Duration extends TimeLikeOps[Duration] with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Duration
  2. Serializable
  3. TimeLikeOps
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val Bottom: Duration

    Duration Bottom is smaller than any other duration, except for itself.

    Duration Bottom is smaller than any other duration, except for itself. Bottom's complement is Top.

    Definition Classes
    DurationTimeLikeOps
  5. val NanosPerDay: Long
  6. val NanosPerHour: Long
  7. val NanosPerMicrosecond: Long
  8. val NanosPerMillisecond: Long
  9. val NanosPerMinute: Long
  10. val NanosPerSecond: Long
  11. val Top: Duration

    Duration Top is greater than any other duration, except for itself.

    Duration Top is greater than any other duration, except for itself. Top's complement is Bottom.

    Definition Classes
    DurationTimeLikeOps
  12. val Undefined: Duration

    An undefined value: behaves like Double.NaN

    An undefined value: behaves like Double.NaN

    Definition Classes
    DurationTimeLikeOps
  13. val Zero: Duration

    The zero value

    The zero value

    Definition Classes
    DurationTimeLikeOps
  14. def apply(value: Long, unit: TimeUnit): Duration

    Create a duration from a java.util.concurrent.TimeUnit.

  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  20. def fromDays(days: Int): Duration
    Definition Classes
    DurationTimeLikeOps
  21. def fromFractionalSeconds(seconds: Double): Duration

    Make a new This from the given number of seconds.

    Make a new This from the given number of seconds. Because this method takes a Double, it can represent values less than a second. Note however that there is some slop in floating-point conversion that limits precision. Currently we can assume at least microsecond precision.

    Definition Classes
    DurationTimeLikeOps
  22. def fromHours(hours: Int): Duration
    Definition Classes
    DurationTimeLikeOps
  23. def fromJava(value: java.time.Duration): Duration

    Create a duration from a java.time.Duration.

  24. def fromMicroseconds(micros: Long): Duration
    Definition Classes
    DurationTimeLikeOps
  25. def fromMilliseconds(millis: Long): Duration
    Definition Classes
    DurationTimeLikeOps
  26. def fromMinutes(minutes: Int): Duration
    Definition Classes
    DurationTimeLikeOps
  27. def fromNanoseconds(nanoseconds: Long): Duration

    Make a new This from the given number of nanoseconds

    Make a new This from the given number of nanoseconds

    Definition Classes
    DurationTimeLikeOps
  28. def fromSeconds(seconds: Int): Duration
    Definition Classes
    DurationTimeLikeOps
  29. def fromTimeUnit(value: Long, unit: TimeUnit): Duration

    Create a duration from a java.util.concurrent.TimeUnit.

    Create a duration from a java.util.concurrent.TimeUnit. Synonym for apply.

  30. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  31. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  32. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. def parse(s: String): Duration

    Parse a String representation of a duration.

    Parse a String representation of a duration. This method will parse any duration generated by Duration.toString.

    The format is either one of the special values, or non-empty sequence of durations. Each duration is a sign, an integer, a dot, and a unit. The unit may be plural or singular. The parser will ignore whitespace around signs and at the beginning and end. (That is, it accepts "1.second + 1.minute" and " 1.second ".) It's permissible to omit the sign before the first duration.

    The special values are "Duration.Top", "Duration.Bottom" and "Duration.Undefined".

    The parser is case-insensitive.

    Note

    Throws RuntimeException if the string cannot be parsed.

  37. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  42. object Finite

    An extractor for finite TimeLikes; eg.:

    An extractor for finite TimeLikes; eg.:

    duration match {
      case Duration.Finite(d) => ...
      case Duration.Top => ..
    Definition Classes
    TimeLikeOps
  43. object Nanoseconds

    An extractor for finite This, yielding its value in nanoseconds.

    An extractor for finite This, yielding its value in nanoseconds.

    duration match {
      case Duration.Nanoseconds(ns) => ...
      case Duration.Top => ...
    }
    Definition Classes
    TimeLikeOps

Inherited from Serializable

Inherited from TimeLikeOps[Duration]

Inherited from AnyRef

Inherited from Any

Ungrouped