diff options
author | Ico Doornekamp <ico@pruts.nl> | 2018-02-23 19:16:11 +0100 |
---|---|---|
committer | Ico Doornekamp <ico@pruts.nl> | 2018-02-23 19:16:11 +0100 |
commit | d6229f20ffce969a48b100d45e4b3b165af2ce72 (patch) | |
tree | 8ea36a4a7ae53eaf188ebe77a27280f8f687f17d /lib/pure | |
parent | fb3e460f6d2b1b31b75e8219ff52cacd1a9f5184 (diff) | |
download | Nim-d6229f20ffce969a48b100d45e4b3b165af2ce72.tar.gz |
Allow float argument to sleepAsync() to allow sub-millisecond resolution
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/asyncdispatch.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index a52c667fc..dfc7201b8 100644 --- a/lib/pure/asyncdispatch.nim +++ b/lib/pure/asyncdispatch.nim @@ -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") |