Allow float argument to sleepAsync() to allow sub-millisecond resolution
This commit is contained in:
parent
fb3e460f6d
commit
d6229f20ff
1 changed files with 1 additions and 1 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue