anchor.diff:  
   ;; Event queues
   
  +(defstruct schedule-entry
  +  time event)
  +
   (defclass schedule-mixin ()
     ((schedule-time
  -         :initform nil
  -         :accessor event-schedule-time
  -         :documentation "The next time an event should be scheduled.")
  +    :initform nil
  +    :accessor event-schedule-time
  +    :documentation "The next time an event should be scheduled.")
      (schedule
  -         :initform nil
  -         :accessor event-queue-schedule
  -         :documentation "Time ordered queue of events to schedule."))
  +    :initform nil
  +    :accessor event-queue-schedule
  +    :documentation "Time ordered queue of events to schedule."))
     (:documentation "Experimental timer event extension."))
   
   (defun now ()
  
positive.code:                             ((null timeout) (- schedule-time (now)))
                              (T (min timeout (- schedule-time (now))))))
               (port (event-queue-port queue)))
          (process-next-event port :wait-function wait-function :timeout timeout)
          (%event-queue-read queue))))
  
  
negative.code: ;; See if it's time to inject a scheduled event into the queue.
  (defun check-schedule (event-queue)
    (check-type event-queue schedule-mixin)
    (alexandria:when-let* ((schedule-time (event-schedule-time event-queue))
                           (execute-p (>= (now) schedule-time))
                           (entry (pop (event-queue-schedule event-queue))))
      (event-queue-append event-queue (schedule-entry-event entry))
      (if-let ((next-entry (first (event-queue-schedule event-queue))))
        (setf schedule-time (schedule-entry-time next-entry))
        (setf schedule-time nil))))
  
  (defun schedule-event-queue (event-queue sheet event delay)
    (declare (ignore sheet))
    (check-type event-queue schedule-mixin)
    (with-slots (schedule-time schedule) event-queue
      (let ((alarm (+ (now) delay)))
        (cond
          ((null schedule)
           (push (make-schedule-entry :time alarm :event event) schedule)
           (setf schedule-time alarm))
          ((< alarm schedule-time)
           (push (make-schedule-entry :time alarm :event event) schedule)
           (setf schedule-time alarm))
          (t
           (do* ((previous schedule (rest previous))
                 (current  (rest schedule) (rest current))
                 (entry #1=(first current) #1#))
                ((or (null current)
                     (< alarm (schedule-entry-time entry)))
                 (setf (cdr previous)
                       (list* (make-schedule-entry :time alarm :event event) (cdr previous))))))))))
  
  ;;; EVENT-QUEUE protocol (not exported)
  
  