1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
3 ;;; --- Various time-related functions.
6 (in-package :io.multiplex
)
10 (defun abs-timeout (timeout)
11 (+ (isys:%sys-get-monotonic-time
) (normalize-timeout timeout
)))
13 (defun min-timeout (&rest timeouts
)
14 (let* ((good-timeout-start (member-if-not #'null timeouts
))
15 (min (car good-timeout-start
)))
16 (loop :for timeout
:in
(cdr good-timeout-start
)
18 (setf min
(if min
(min min timeout
) timeout
))
19 :finally
(return min
))))