Packages

sealed trait Duration extends Ordered[Duration] with Serializable with Product

Non-negative duration. Operations that would result in negative value of nanoseconds return zero duration and ones that would result in Long.MaxValue overflow return infinity. Infinity has Long.MaxValue nanoseconds value, but for arithmetic operations behaviour is mathematical infinity like-ish.

Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Duration
  2. Product
  3. Equals
  4. Serializable
  5. Serializable
  6. Ordered
  7. Comparable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type SpecificScalaDuration <: scala.concurrent.duration.Duration

Abstract Value Members

  1. abstract def *(factor: Double): Duration

    Multiplies by factor, when nanoseconds overflow Long.MaxValue returns Infinity, if factor is negative returns Duration.Zero.

  2. abstract def +(other: Duration): Duration

    Adds other Duration.

    Adds other Duration. When nanoseconds overflow Long.MaxValue returns Infinity.

  3. abstract def asJava: java.time.Duration

    The java.time.Duration returned for an infinite Duration is technically "only" ~2x10^16 hours long (Long.MaxValue number of seconds)

  4. abstract def asScala: SpecificScalaDuration
  5. abstract def canEqual(that: Any): Boolean
    Definition Classes
    Equals
  6. abstract def compare(that: Duration): Int
    Definition Classes
    Ordered
  7. abstract def isZero: Boolean

    Whether this is a zero duration

  8. abstract def productArity: Int
    Definition Classes
    Product
  9. abstract def productElement(n: Int): Any
    Definition Classes
    Product
  10. abstract def render: String
  11. abstract def toMillis: Long

    Number of milliseconds.

  12. abstract def toNanos: Long

    Number of nanoseconds.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def <(that: Duration): Boolean
    Definition Classes
    Ordered
  4. def <=(that: Duration): Boolean
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def >(that: Duration): Boolean
    Definition Classes
    Ordered
  7. def >=(that: Duration): Boolean
    Definition Classes
    Ordered
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  10. def compareTo(that: Duration): Int
    Definition Classes
    Ordered → Comparable
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def fold[Z](infinity: ⇒ Z, finite: (Finite) ⇒ Z): Z
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def max(other: Duration): Duration
  19. final def min(other: Duration): Duration
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def productIterator: Iterator[Any]
    Definition Classes
    Product
  24. def productPrefix: String
    Definition Classes
    Product
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Product

Inherited from Equals

Inherited from Serializable

Inherited from Serializable

Inherited from Ordered[Duration]

Inherited from Comparable[Duration]

Inherited from AnyRef

Inherited from Any

Ungrouped