termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

[nim]: Error: undeclared identifier: 'addTimer' of asyncdispatch

Open lost22git opened this issue 6 months ago • 0 comments

; 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()

lost22git avatar Jun 10 '25 13:06 lost22git