flix

0.69.2

Time.Duration

enum Duration with Eq, Order, HashSource
case Duration(Int64)

Represents a duration of time stored as nanoseconds (Int64).

Instances

instance Add[Duration]Source
instance Eq[Duration]Source
instance Formattable[Duration]Source
instance Hash[Duration]Source
instance Order[Duration]Source
instance Sub[Duration]Source
instance ToString[Duration]Source

Definitions

def days(n: Int32): Duration Source

Returns a duration of n days.

def hours(n: Int32): Duration Source

Returns a duration of n hours.

def isNegative(d: Duration): Bool Source

Returns true if d is negative.

def isPositive(d: Duration): Bool Source

Returns true if d is positive.

def isZero(d: Duration): Bool Source

Returns true if d is zero.

def microseconds(n: Int32): Duration Source

Returns a duration of n microseconds.

def milliseconds(n: Int32): Duration Source

Returns a duration of n milliseconds.

def minutes(n: Int32): Duration Source

Returns a duration of n minutes.

def nanoseconds(n: Int64): Duration Source

Returns a duration of n nanoseconds.

def of(n: Int32, u: TimeUnit): Duration Source

Returns a duration of n in the given time unit u.

def seconds(n: Int32): Duration Source

Returns a duration of n seconds.

def toDays(d: Duration): Int64 Source

Returns the total number of days in d (truncated).

def toHours(d: Duration): Int64 Source

Returns the total number of hours in d (truncated).

def toMicros(d: Duration): Int64 Source

Returns the total number of microseconds in d (truncated).

def toMillis(d: Duration): Int64 Source

Returns the total number of milliseconds in d (truncated).

def toMinutes(d: Duration): Int64 Source

Returns the total number of minutes in d (truncated).

def toNanos(d: Duration): Int64 Source

Returns the total number of nanoseconds in d.

def toSeconds(d: Duration): Int64 Source

Returns the total number of seconds in d (truncated).

def zero(): Duration Source

Returns the zero duration.