mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 02:44:44 +00:00
fixes #23844 follow up https://github.com/nim-lang/Nim/pull/23834 ```nim type Timespec* {.importc: "struct timespec", header: "<time.h>", final, pure.} = object ## struct timespec tv_sec*: Time ## Seconds. tv_nsec*: clong ## Nanoseconds. ```
This commit is contained in:
@@ -1406,7 +1406,7 @@ elif not defined(useNimRtl):
|
||||
waitSpec: TimeSpec
|
||||
unused: Timespec
|
||||
waitSpec.tv_sec = posix.Time(secs)
|
||||
waitSpec.tv_nsec = ns
|
||||
waitSpec.tv_nsec = clong ns
|
||||
discard posix.clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, waitSpec, unused)
|
||||
let remaining = deadline - getMonoTime()
|
||||
delay = min([delay * 2, remaining, maxWait])
|
||||
|
||||
Reference in New Issue
Block a user