enum Duration with Eq, Order, Hash
case Duration(Int64)
Represents a duration of time stored as nanoseconds (Int64).
instance Add[Duration]
instance Eq[Duration]
instance Formattable[Duration]
instance Hash[Duration]
instance Order[Duration]
instance Sub[Duration]
instance ToString[Duration]
def days(n: Int32): Duration
Returns a duration of n days.
n
def hours(n: Int32): Duration
Returns a duration of n hours.
def isNegative(d: Duration): Bool
Returns true if d is negative.
true
d
def isPositive(d: Duration): Bool
Returns true if d is positive.
def isZero(d: Duration): Bool
Returns true if d is zero.
def microseconds(n: Int32): Duration
Returns a duration of n microseconds.
def milliseconds(n: Int32): Duration
Returns a duration of n milliseconds.
def minutes(n: Int32): Duration
Returns a duration of n minutes.
def nanoseconds(n: Int64): Duration
Returns a duration of n nanoseconds.
def of(n: Int32, u: TimeUnit): Duration
Returns a duration of n in the given time unit u.
u
def seconds(n: Int32): Duration
Returns a duration of n seconds.
def toDays(d: Duration): Int64
Returns the total number of days in d (truncated).
def toHours(d: Duration): Int64
Returns the total number of hours in d (truncated).
def toMicros(d: Duration): Int64
Returns the total number of microseconds in d (truncated).
def toMillis(d: Duration): Int64
Returns the total number of milliseconds in d (truncated).
def toMinutes(d: Duration): Int64
Returns the total number of minutes in d (truncated).
def toNanos(d: Duration): Int64
Returns the total number of nanoseconds in d.
def toSeconds(d: Duration): Int64
Returns the total number of seconds in d (truncated).
def zero(): Duration
Returns the zero duration.