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")
}Вывод
later done
pub(api) fn after<effect F>(d: Dur, body: fn() F) time, FПотокобезопасность. runs in the calling task; it is cancelled with it.
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
d | Dur |
body | fn() F |
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/time/time.oxl:2515