SplitScript reference / Instant / elapsed
Instant.elapsed
Method
Instant.elapsed() -> Duration
Returns the duration elapsed since this instant.
This is shorthand for reading the clock and calling durationSince.
Effects: allocates, reads runtime state
Runtime behavior: available everywhere; synchronous
Examples
Trigger after a debounce interval
let detectedAt = Instant.now()
if detectedAt.elapsed().totalMilliseconds() >= 250 {
print("ready")
}