SplitScript reference / Duration / greaterThanOrEqual

Duration.greaterThanOrEqual

Operator

Duration.greaterThanOrEqual(other: Duration) -> bool

Reports whether this duration is at least another duration.

This method implements the >= operator without converting to floating point.

Parameters

  • other: The duration to compare against.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Trigger once a delay has elapsed

let elapsed = Duration.fromMilliseconds(250.0)
let delay = Duration.fromMilliseconds(250.0)
let ready = elapsed >= delay