com.twitter.util

Time

sealed class Time extends TimeLike[Time] with Serializable

An absolute point in time, represented as the number of nanoseconds since the Unix epoch.

Linear Supertypes
Serializable, TimeLike[Time], Ordered[Time], Comparable[Time], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Time
  2. Serializable
  3. TimeLike
  4. Ordered
  5. Comparable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(delta: Duration): Time

    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.

    Definition Classes
    TimeLike
  5. def -(that: Time): Duration

    Creates a duration between two times.

  6. def -(delta: Duration): Time

    Definition Classes
    TimeLike
  7. def <(that: Time): Boolean

    Definition Classes
    Ordered
  8. def <=(that: Time): Boolean

    Definition Classes
    Ordered
  9. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  11. def >(that: Time): Boolean

    Definition Classes
    Ordered
  12. def >=(that: Time): Boolean

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

    Definition Classes
    Any
  14. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. def compare(that: Time): Int

    Definition Classes
    TimeLike → Ordered
  16. def compareTo(that: Time): Int

    Definition Classes
    Ordered → Comparable
  17. def diff(that: Time): Duration

    The difference between the two TimeLikes

    The difference between the two TimeLikes

    Definition Classes
    TimeTimeLike
  18. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. def equals(other: Any): Boolean

    Definition Classes
    Time → AnyRef → Any
  20. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. def floor(x: Duration): Time

    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.

    Definition Classes
    TimeLike
  22. def format(pattern: String, locale: Locale): String

    Formats this Time according to the given SimpleDateFormat pattern and locale.

  23. def format(pattern: String): String

    Formats this Time according to the given SimpleDateFormat pattern.

  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def hashCode(): Int

    Definition Classes
    Time → AnyRef → Any
  26. def inDays: Int

    Definition Classes
    TimeLike
  27. def inHours: Int

    Definition Classes
    TimeLike
  28. def inMicroseconds: Long

    Definition Classes
    TimeLike
  29. def inMillis: Long

    Definition Classes
    TimeLike
  30. def inMilliseconds: Long

    Definition Classes
    TimeLike
  31. def inMinutes: Int

    Definition Classes
    TimeLike
  32. def inNanoseconds: Long

    The TimeLike's value in nanoseconds.

    The TimeLike's value in nanoseconds.

    Definition Classes
    TimeTimeLike
  33. def inSeconds: Int

    Definition Classes
    TimeLike
  34. def inTimeUnit: (Long, TimeUnit)

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

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

    Definition Classes
    TimeLike
  35. def isFinite: Boolean

    Is this a finite TimeLike value?

    Is this a finite TimeLike value?

    Definition Classes
    TimeTimeLike
  36. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  37. def max(that: Time): Time

    Definition Classes
    TimeLike
  38. def min(that: Time): Time

    Definition Classes
    TimeLike
  39. def moreOrLessEquals(other: Time, maxDelta: Duration): Boolean

    Equality within maxDelta

    Equality within maxDelta

    Definition Classes
    TimeLike
  40. val nanos: Long

    Attributes
    protected
  41. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  42. final def notify(): Unit

    Definition Classes
    AnyRef
  43. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  44. val ops: Time.type

    Attributes
    protected
    Definition Classes
    TimeTimeLike
  45. def since(that: Time): Duration

    Duration that has passed between the given time and the current time.

  46. def sinceEpoch: Duration

    Duration that has passed between the epoch and the current time.

  47. def sinceNow: Duration

    Gets the current time as Duration since now

  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  49. def toDate: Date

    Converts this Time object to a java.

    Converts this Time object to a java.util.Date

  50. def toString(): String

    Renders this time using the default format.

    Renders this time using the default format.

    Definition Classes
    Time → AnyRef → Any
  51. def until(that: Time): Duration

    Duration between current time and the givne time.

  52. def untilEpoch: Duration

    Gets the duration between this time and the epoch.

  53. def untilNow: Duration

    Gets the duration between this time and now.

  54. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def fromEpoch: Duration

    Duration that has passed between the epoch and the current time.

    Duration that has passed between the epoch and the current time.

    Annotations
    @deprecated
    Deprecated

    (Since version 2011-05-23) use sinceEpoch

Inherited from Serializable

Inherited from TimeLike[Time]

Inherited from Ordered[Time]

Inherited from Comparable[Time]

Inherited from AnyRef

Inherited from Any

Ungrouped