diff --git a/examples/pingpong.nim b/examples/pingpong.nim index 75c8cf9..7f557c7 100644 --- a/examples/pingpong.nim +++ b/examples/pingpong.nim @@ -38,7 +38,7 @@ proc main() {.async.} = # Wire Callbacks saro.onNewMessage(proc(convo: Conversation, msg: ReceivedMessage) {.async.} = echo " Saro <------ :: " & getContent(msg.content) - await sleepAsync(5000) + await sleepAsync(5000.milliseconds) discard await convo.sendMessage(saro.ds, initTextFrame("Ping").toContentFrame()) ) @@ -52,11 +52,11 @@ proc main() {.async.} = raya.onNewMessage(proc(convo: Conversation,msg: ReceivedMessage) {.async.} = echo fmt" ------> Raya :: from:{msg.sender} " & getContent(msg.content) - await sleepAsync(500) + await sleepAsync(500.milliseconds) discard await convo.sendMessage(raya.ds, initTextFrame("Pong" & $ri).toContentFrame()) - await sleepAsync(800) + await sleepAsync(800.milliseconds) discard await convo.sendMessage(raya.ds, initTextFrame("Pong" & $ri).toContentFrame()) - await sleepAsync(500) + await sleepAsync(500.milliseconds) discard await convo.sendMessage(raya.ds, initTextFrame("Pong" & $ri).toContentFrame()) inc ri ) @@ -73,13 +73,13 @@ proc main() {.async.} = await saro.start() await raya.start() - await sleepAsync(5000) + await sleepAsync(5.seconds) # Perform OOB Introduction: Raya -> Saro let raya_bundle = raya.createIntroBundle() discard await saro.newPrivateConversation(raya_bundle) - await sleepAsync(20000) # Run for some time + await sleepAsync(20.seconds) # Run for some time saro.stop() raya.stop() diff --git a/examples/tui/tui.nim b/examples/tui/tui.nim index 3b9cac9..4fbd462 100644 --- a/examples/tui/tui.nim +++ b/examples/tui/tui.nim @@ -490,7 +490,7 @@ proc appLoop(app: ChatApp, panes: seq[Pane]) : Future[void] {.async.} = illwillInit(fullscreen = false) # Clear buffer while true: - await sleepAsync(5) + await sleepAsync(5.milliseconds) app.tb.clear() drawStatusBar(app, panes[0], fgBlack, getIdColor(app.client.getId())) @@ -527,7 +527,7 @@ proc appLoop(app: ChatApp, panes: seq[Pane]) : Future[void] {.async.} = proc peerWatch(app: ChatApp): Future[void] {.async.} = while true: - await sleepAsync(1000) + await sleepAsync(1.seconds) app.peerCount = app.client.ds.getConnectedPeerCount()