termux-packages
termux-packages copied to clipboard
[nim]: Error: undeclared identifier: 'addTimer' of asyncdispatch
; nim -v
Nim Compiler Version 2.2.4 [Android: arm64]
Compiled at 2025-04-22
Copyright (c) 2006-2025 by Andreas Rumpf
git hash: f7145dd26efeeeb6eeae6fff649db244d81b212d
active boot switches: -d:release -d:danger
import std/asyncdispatch
proc callback(fd: AsyncFD): bool =
result = false
echo "hello"
proc main() {.async.} =
echo "begin"
asyncdispatch.addTimer(1000, false, callback)
echo "end"
waitFor main()