fn after
Runs body once after d (§17.4). Runs in the current task: it is cancelled with it.
Example:
use std.time { after }
fn main() io, time {
after(20ms) { print("later") }
print("done")
}Output
later done
pub(api) fn after<effect F>(d: Dur, body: fn() F) time, FThread safety. runs in the calling task; it is cancelled with it.
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
d | Dur |
body | fn() F |
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:2515