diff options
author | Christopher Baines <mail@cbaines.net> | 2024-06-10 13:25:36 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-06-10 13:25:36 +0100 |
commit | 666cf6b0b903dd14d8075b76151c5fb39bab5b61 (patch) | |
tree | 3fc13793849d8df0135c6547e866389ba9f53e5b /guix-build-coordinator/utils.scm | |
parent | 4ccfaffc1965cb4ed060bbd82a425026ab3bb36e (diff) | |
download | build-coordinator-666cf6b0b903dd14d8075b76151c5fb39bab5b61.tar build-coordinator-666cf6b0b903dd14d8075b76151c5fb39bab5b61.tar.gz |
Change with-port-timeouts to use seconds for the timeout
Diffstat (limited to 'guix-build-coordinator/utils.scm')
-rw-r--r-- | guix-build-coordinator/utils.scm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index 0a3383c..d747962 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -215,7 +215,7 @@ (define port-write-timeout-error? (record-predicate &port-write-timeout)) -(define* (with-port-timeouts thunk #:key (timeout (* 120 1000))) +(define* (with-port-timeouts thunk #:key (timeout 120)) ;; When the GC runs, it restarts the poll syscall, but the timeout remains ;; unchanged! When the timeout is longer than the time between the syscall @@ -227,8 +227,7 @@ (define (wait port mode) (let ((timeout-internal (+ (get-internal-real-time) - (* internal-time-units-per-second - (/ timeout 1000))))) + (* internal-time-units-per-second timeout)))) (let loop ((poll-value (port-poll port mode poll-timeout-ms))) (if (= poll-value 0) |