mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 05:20:31 +00:00
fixes #23732
(cherry picked from commit 2a658c64d8)
This commit is contained in:
@@ -692,7 +692,10 @@ proc getAppDir*(): string {.rtl, extern: "nos$1", tags: [ReadIOEffect], noWeirdT
|
||||
|
||||
proc sleep*(milsecs: int) {.rtl, extern: "nos$1", tags: [TimeEffect], noWeirdTarget.} =
|
||||
## Sleeps `milsecs` milliseconds.
|
||||
## A negative `milsecs` causes sleep to return immediately.
|
||||
when defined(windows):
|
||||
if milsecs < 0:
|
||||
return # fixes #23732
|
||||
winlean.sleep(int32(milsecs))
|
||||
else:
|
||||
var a, b: Timespec
|
||||
|
||||
Reference in New Issue
Block a user