Skip to content

Commit

Permalink
faster cancel and if delay is nil then cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
vii committed Jul 5, 2009
1 parent 397950f commit dd3ff9d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/timeout.lisp
Expand Up @@ -40,6 +40,7 @@


(my-defun timeout cancel ()
(my-declare-fast-inline)
(quick-queue-entry-del me))

(my-defun timeout merge ()
Expand All @@ -48,8 +49,11 @@
(quick-queue-entry-add me (my position))))

(my-defun timeout reset (delay)
(setf (my time) (time-for-delay delay))
(my merge))
(cond (delay
(setf (my time) (time-for-delay delay))
(my merge))
(t
(my cancel))))

(my-defun timeout set (delay &optional func)
(when func
Expand Down

0 comments on commit dd3ff9d

Please sign in to comment.