SplitScript reference / Instant / hasElapsed

Instant.hasElapsed

Method

Instant.hasElapsed(delay: Duration) -> bool

Reports whether at least the requested duration has elapsed.

This is the usual operation for delayed splits and debouncing. It reads the monotonic clock once and compares exact durations.

Parameters

  • delay: The minimum duration that must have elapsed.

Effects: allocates, reads runtime state

Runtime behavior: available everywhere; synchronous

Examples

Wait for a delayed split

let detectedAt = Instant.now()
let ready = detectedAt.hasElapsed(Duration.fromMilliseconds(250.0))