Fix: ensure that eventually works when std/times is imported

This commit is contained in:
Mark Spanbroek 2024-01-10 13:01:34 +01:00
parent 98f99df4b4
commit 3313b54fc0
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import pkg/chronos
template eventually*(expression: untyped, timeout=5000): bool =
bind Moment, now, milliseconds
proc eventually: Future[bool] {.async.} =
let endTime = Moment.now() + timeout.milliseconds

View File

@ -2,3 +2,10 @@ import pkg/asynctest/chronos/unittest
include ../common/testbody
include ../common/testfail
import std/times
suite "eventually and std/times":
test "compiles when both chronos and std/times are imported":
check eventually true