Skip to content

Commit 2ec4723

Browse files
committed
use internal-real-time instead of universal time when computing the reduced epoll timeout
1 parent e5cc4fc commit 2ec4723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/io/syscalls.lisp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,13 +681,13 @@
681681
(timeout :int))
682682

683683
(defun syscall-retry-epoll_wait (epfd events maxevents timeout-ms)
684-
(let ((start (get-universal-us)))
684+
(let ((start (get-internal-real-time)))
685685
(loop
686686
(let ((retval (syscall-noretry-epoll_wait epfd events maxevents timeout-ms)))
687687
(when retval (return retval))
688688
(unless (>= 0 timeout-ms)
689689
(setf timeout-ms
690-
(max (- timeout-ms (floor (- (get-universal-us) start) 1000)) 0)))))))
690+
(max (- timeout-ms (floor (- (get-internal-real-time) start) (ceiling internal-time-units-per-second 1000))) 0)))))))
691691

692692
(def-simple-syscall epoll_ctl
693693
(epfd :int)

0 commit comments

Comments
 (0)