Class/Object

com.twitter.util

Time

Related Docs: object Time | package util

Permalink

sealed class Time extends TimeLike[Time] with Serializable

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

See also

TimeFormat for converting to and from String representations.

Stopwatch for measuring elapsed time.

Duration for intervals between two points in time.

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
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 +(delta: Duration): Time

    Permalink

    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
  4. def -(that: Time): Duration

    Permalink

    Creates a duration between two times.

  5. def -(delta: Duration): Time

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  12. def ceil(increment: Duration): Time

    Permalink

    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.

    Definition Classes
    TimeTimeLike
  13. def clone(): AnyRef

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

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

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

    Permalink

    The difference between the two TimeLikes

    The difference between the two TimeLikes

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def floor(increment: Duration): Time

    Permalink

    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
    TimeTimeLike
  21. def format(pattern: String, locale: Locale): String

    Permalink

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

  22. def format(pattern: String): String

    Permalink

    Formats this Time according to the given SimpleDateFormat pattern.

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

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

    Permalink
    Definition Classes
    Time → AnyRef → Any
  25. def inDays: Int

    Permalink
    Definition Classes
    TimeLike
  26. def inHours: Int

    Permalink
    Definition Classes
    TimeLike
  27. def inLongSeconds: Long

    Permalink
    Definition Classes
    TimeLike
  28. def inMicroseconds: Long

    Permalink
    Definition Classes
    TimeLike
  29. def inMillis: Long

    Permalink
    Definition Classes
    TimeLike
  30. def inMilliseconds: Long

    Permalink
    Definition Classes
    TimeLike
  31. def inMinutes: Int

    Permalink
    Definition Classes
    TimeLike
  32. def inNanoseconds: Long

    Permalink

    The TimeLike's value in nanoseconds.

    The TimeLike's value in nanoseconds.

    Definition Classes
    TimeTimeLike
  33. def inSeconds: Int

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

    Permalink

    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

    Permalink

    Is this a finite TimeLike value?

    Is this a finite TimeLike value?

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

    Permalink
    Definition Classes
    Any
  37. def isZero: Boolean

    Permalink

    Is this a finite TimeLike value and equals 0

    Is this a finite TimeLike value and equals 0

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

    Permalink
    Definition Classes
    TimeLike
  39. def min(that: Time): Time

    Permalink
    Definition Classes
    TimeLike
  40. def minus(that: Time): Duration

    Permalink

    Finds a diff between this and that time.

  41. def minus(delta: Duration): Time

    Permalink

    Subtracts delta from this Time.

  42. def moreOrLessEquals(other: Time, maxDelta: Duration): Boolean

    Permalink

    Equality within maxDelta

    Equality within maxDelta

    Definition Classes
    TimeLike
  43. val nanos: Long

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

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

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

    Permalink
    Definition Classes
    AnyRef
  47. val ops: Time.type

    Permalink
    Attributes
    protected
    Definition Classes
    TimeTimeLike
  48. def plus(delta: Duration): Time

    Permalink

    Adds delta to this Time.

  49. def since(that: Time): Duration

    Permalink

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

  50. def sinceEpoch: Duration

    Permalink

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

  51. def sinceNow: Duration

    Permalink

    Gets the current time as Duration since now

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

    Permalink
    Definition Classes
    AnyRef
  53. def toDate: Date

    Permalink

    Converts this Time object to a java.util.Date

  54. def toString(): String

    Permalink

    Renders this time using the default format.

    Renders this time using the default format.

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

    Permalink

    Duration between current time and the given time.

  56. def untilEpoch: Duration

    Permalink

    Gets the duration between this time and the epoch.

  57. def untilNow: Duration

    Permalink

    Gets the duration between this time and now.

  58. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from TimeLike[Time]

Inherited from Ordered[Time]

Inherited from Comparable[Time]

Inherited from AnyRef

Inherited from Any

Ungrouped