Allow float argument to sleepAsync() to allow sub-millisecond resolution

This commit is contained in:
Ico Doornekamp
2018-02-23 19:16:11 +01:00
parent fb3e460f6d
commit d6229f20ff

View File

@@ -1513,7 +1513,7 @@ proc poll*(timeout = 500) =
# Common procedures between current and upcoming asyncdispatch
include includes.asynccommon
proc sleepAsync*(ms: int): Future[void] =
proc sleepAsync*(ms: int | float): Future[void] =
## Suspends the execution of the current async procedure for the next
## ``ms`` milliseconds.
var retFuture = newFuture[void]("sleepAsync")