Packages

trait TimeLike[This <: TimeLike[This]] extends Ordered[This]

A common trait for time-like values. It requires a companion TimeLikeOps module. TimeLikes are finite, but they must always have two sentinels: Top and Bottom. These act like positive and negative infinities: Arithmetic involving them preserves their values, and so on.

TimeLikes are Long-valued nanoseconds, but have different interpretations: Durations measure the number of nanoseconds between two points in time, while Time measure the number of nanoseconds since the Unix epoch (1 January 1970 00:00:00 UTC).

TimeLike behave like boxed java Double values with respect to infinity and undefined values. In particular, this means that a TimeLike's Undefined value is comparable to other values. In turn this means it can be used as keys in maps, etc.

Overflows are also handled like doubles.

Self Type
This
Linear Supertypes
Ordered[This], Comparable[This], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TimeLike
  2. Ordered
  3. Comparable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def diff(that: This): Duration

    The difference between the two TimeLikes

  2. abstract def inNanoseconds: Long

    The TimeLike's value in nanoseconds.

  3. abstract def isFinite: Boolean

    Is this a finite TimeLike value?

  4. abstract def ops: TimeLikeOps[This]
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(delta: Duration): This

    Adds delta to this TimeLike.

    Adds delta to this TimeLike. Adding Duration.Top results in the TimeLike's Top, adding Duration.Bottom results in the TimeLike's Bottom.

  4. def -(delta: Duration): This
  5. def <(that: This): Boolean
    Definition Classes
    Ordered
  6. def <=(that: This): Boolean
    Definition Classes
    Ordered
  7. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def >(that: This): Boolean
    Definition Classes
    Ordered
  9. def >=(that: This): Boolean
    Definition Classes
    Ordered
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def ceil(increment: Duration): This

    Rounds up to the nearest multiple of the given duration.

    Rounds up to the nearest multiple of the given duration. For example: 127.seconds.ceiling(1.minute) => 3.minutes. Taking the ceiling of a Time object with duration greater than 1.hour can have unexpected results because of timezones.

  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  13. def compare(that: This): Int
    Definition Classes
    TimeLike → Ordered
  14. def compareTo(that: This): Int
    Definition Classes
    Ordered → Comparable
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. def floor(increment: Duration): This

    Rounds down to the nearest multiple of the given duration.

    Rounds down to the nearest multiple of the given duration. For example: 127.seconds.floor(1.minute) => 2.minutes. Taking the floor of a Time object with duration greater than 1.hour can have unexpected results because of timezones.

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def inDays: Int
  22. def inHours: Int
  23. def inLongSeconds: Long
  24. def inMicroseconds: Long
  25. def inMillis: Long
  26. def inMilliseconds: Long
  27. def inMinutes: Int
  28. def inSeconds: Int
  29. def inTimeUnit: (Long, TimeUnit)

    Returns a value/TimeUnit pair; attempting to return coarser grained values if possible (specifically: TimeUnit.MINUTES, TimeUnit.SECONDS or TimeUnit.MILLISECONDS) before resorting to the default TimeUnit.NANOSECONDS.

  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def isZero: Boolean

    Is this a finite TimeLike value and equals 0

  32. def max(that: This): This
  33. def min(that: This): This
  34. def moreOrLessEquals(other: This, maxDelta: Duration): Boolean

    Equality within maxDelta

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

Inherited from Ordered[This]

Inherited from Comparable[This]

Inherited from AnyRef

Inherited from Any

Ungrouped