What would be a nim equivalent of this javascript program with setTimeout? Please don't hack with sleep(1000) and keep the code asynchronous.
setTimeout(
function()
{
console.log("Hello world")
},
1000
)
What would be a nim equivalent of this javascript program with setTimeout? Please don't hack with sleep(1000) and keep the code asynchronous.
setTimeout(
function()
{
console.log("Hello world")
},
1000
)
The asyncdispatch module defines a
sleepAsync
function: https://nim-lang.org/docs/asyncdispatch.html#sleepAsync,intYou can use that to create a
setTimeout
equivalent.