mirror of
https://github.com/status-im/nim-chronos.git
synced 2025-01-26 02:58:57 +00:00
11 lines
180 B
Nim
11 lines
180 B
Nim
import asyncdispatch2
|
|
|
|
proc task() {.async.} =
|
|
await sleepAsync(1000)
|
|
|
|
proc waitTask() {.async.} =
|
|
echo await withTimeout(task(), 100)
|
|
|
|
when isMainModule:
|
|
waitFor waitTask()
|