flix

0.79.0

Duration

Type of durations measured in nanoseconds, and its functions.

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

Type of durations measured in nanoseconds.

A duration is stored as an Int64 number of nanoseconds.

Instances

Add, Eq, Formattable, Hash, Order, Sub, ToString

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.