Companion

object Companion

Helper functions for constructing Intervals.

Properties

Link copied to clipboard

Shorthand for an empty interval.

Link copied to clipboard

The widest representable interval (from long min to long max microseconds).

Functions

Link copied to clipboard
fun at(point: Duration): Interval

Constructs an interval containing a single time point, represented as a Duration object.

Link copied to clipboard
fun between(start: Duration, end: Duration, startInclusivity: Interval.Inclusivity = Inclusivity.Inclusive, endInclusivity: Interval.Inclusivity = startInclusivity): Interval

Constructs an interval between two durations.

Link copied to clipboard
fun betweenClosedOpen(start: Duration, end: Duration): Interval

Constructs an interval between two durations that includes its start and excludes its end.