Class/Object

scala.concurrent.duration

Deadline

Related Docs: object Deadline | package duration

Permalink

case class Deadline extends Ordered[Deadline] with Product with Serializable

This class stores a deadline, as obtained via Deadline.now or the duration DSL:

import scala.concurrent.duration._
3.seconds.fromNow

Its main purpose is to manage repeated attempts to achieve something (like awaiting a condition) by offering the methods hasTimeLeft and timeLeft. All durations are measured according to System.nanoTime aka wall-time; this does not take into account changes to the system clock (such as leap seconds).

Linear Supertypes
Serializable, java.io.Serializable, Product, Equals, math.Ordered[Deadline], Comparable[Deadline], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Deadline
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Ordered
  7. Comparable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: FiniteDuration): Deadline

    Permalink

    Return a deadline advanced (i.e., moved into the future) by the given duration.

  4. def -(other: Deadline): FiniteDuration

    Permalink

    Calculate time difference between this and the other deadline, where the result is directed (i.e., may be negative).

  5. def -(other: FiniteDuration): Deadline

    Permalink

    Return a deadline moved backwards (i.e., towards the past) by the given duration.

  6. def <(that: Deadline): Boolean

    Permalink

    Returns true if this is less than that

    Returns true if this is less than that

    Definition Classes
    Ordered
  7. def <=(that: Deadline): Boolean

    Permalink

    Returns true if this is less than or equal to that.

    Returns true if this is less than or equal to that.

    Definition Classes
    Ordered
  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def >(that: Deadline): Boolean

    Permalink

    Returns true if this is greater than that.

    Returns true if this is greater than that.

    Definition Classes
    Ordered
  10. def >=(that: Deadline): Boolean

    Permalink

    Returns true if this is greater than or equal to that.

    Returns true if this is greater than or equal to that.

    Definition Classes
    Ordered
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def compare(other: Deadline): Int

    Permalink

    The natural ordering for deadline is determined by the natural order of the underlying (finite) duration.

    The natural ordering for deadline is determined by the natural order of the underlying (finite) duration.

    Definition Classes
    DeadlineOrdered
  14. def compareTo(that: Deadline): Int

    Permalink

    Result of comparing this with operand that.

    Result of comparing this with operand that.

    Definition Classes
    Ordered → Comparable
  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hasTimeLeft(): Boolean

    Permalink

    Determine whether the deadline still lies in the future at the point where this method is called.

    Determine whether the deadline still lies in the future at the point where this method is called.

    Note that on some systems this operation is costly because it entails a system call. Check System.nanoTime for your platform.

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def isOverdue(): Boolean

    Permalink

    Determine whether the deadline lies in the past at the point where this method is called.

    Determine whether the deadline lies in the past at the point where this method is called.

    Note that on some systems this operation is costly because it entails a system call. Check System.nanoTime for your platform.

  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. val time: FiniteDuration

    Permalink
  26. def timeLeft: FiniteDuration

    Permalink

    Calculate time difference between this duration and now; the result is negative if the deadline has passed.

    Calculate time difference between this duration and now; the result is negative if the deadline has passed.

    Note that on some systems this operation is costly because it entails a system call. Check System.nanoTime for your platform.

  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from java.io.Serializable

Inherited from Product

Inherited from Equals

Inherited from math.Ordered[Deadline]

Inherited from Comparable[Deadline]

Inherited from AnyRef

Inherited from Any

Ungrouped