anchor.diff:      (setf launch-done T)
       thread))
   
  -(defmacro define-timer (name (&key documentation module-name (modulevar 'module)) &body body)
  -  ""
  +(defun schedule-timer (timer type delay &key arguments (if-exists NIL iep))
  +  ""
  +  (assert (member type '(:date :time :once :when :interval :repeating :loop :every)) ()
  +          "TYPE must be one of (:DATE :TIME :ONCE :INTERVAL :REPEATING :LOOP).")
  +  (assert (member if-exists '(:error :add NIL)) ()
  +          "IF-EXISTS must be one of (:ERROR :ADD NIL) ~a")
  +  (let ((handler (time-handler timer))
  +        (delay (parse-delay delay)))
  +    (unless handler
  +      (error "No such time-handler found: ~a" timer))
  +    (unless iep
  +      (case (timer-type handler)
  +        (:multiple (setf if-exists :add))
  +        (:single (setf if-exists :error))))
  +    (v:debug :timer "Scheduling timer ~a with ~a ~a" timer type delay)
  +    (launch-timer handler type delay arguments))
  +  T)
  +
  +(defun reschedule-timer (identifier type delay &key arguments (replace :all))
  +  ""
  +  (assert (find type '(:date :time :once :when :interval :repeating :loop :every)) ()
  +          "TYPE must be one of (:DATE :TIME :ONCE :INTERVAL :REPEATING :LOOP).")
  +  (assert (or (find replace '(:all :first :last))
  +              (typep replace 'integer)) ()
  +          "IF-EXISTS must be one of (:ERROR :ADD NIL INTEGER)")
  +  (let ((handler (time-handler identifier))
  +        (delay (parse-delay delay)))
  +    (unless handler
  +      (error "No such time-handler found: ~a" identifier))
  +    (v:debug :timer "Rescheduling timer ~a (replacing ~a) with ~a ~a" identifier replace type delay)
  +    (if (eq replace :all)
  +        (loop for thread = (pop (active-timers handler))
  +              while thread do (when (thread-alive-p thread)
  +                                (destroy-thread thread))
  +              finally (launch-timer handler type delay arguments))
  +        (let ((position (case replace
  +                          (:first 0)
  +                          (:last (1- (length (active-timers handler))))
  +                          (T replace))))
  +          (launch-timer handler type delay arguments)
  +          (setf (nth position (active-timers handler))
  +                (pop (active-timers handler))))))
  +  T)
  +
  +(defmacro define-timer (name (&rest args) (&key (type :multiple) documentation module-name (modulevar 'module)) &body body)
  +  ""
  +  (assert (find type '(:MULTIPLE :SINGLE)) () "TYPE must be one of (:MULTIPLE :SINGLE)")
     (unless module-name
       (setf module-name (get-current-module-name)))
  -  (let ((launcher (gensym "LAUNCHER-FUNCTION"))
  -        (handler (gensym "HANDLER-FUNCTION")))
  +  (let ((handler (gensym "HANDLER-FUNCTION")))
       `(eval-when (:compile-toplevel :load-toplevel :execute)
          (let ((,handler
  -               #'(lambda ()
  +               #'(lambda ,args
                      ,@(if module-name
                            `((with-module (,modulevar ,module-name)
                                (when (active ,modulevar)
                                  (with-module-lock (,modulevar)
                                    (with-module-storage (,modulevar)
                                      ,@body)))))
  -                         body)))
  -             (,launcher
  -               #'(lambda (type delay)
  -                   ,(if module-name
  -                        `(launch-module-timer ',name ',module-name type delay)
  -                        `(launch-generic-timer ',name type delay)))))
  -         (set-timer-function ',name ,launcher ,handler :docstring ,documentation)))))
  +                         body))))
  +         (set-timer-function ',name ,handler :type ,type :docstring ,documentation)))))
  
positive.code: 
  (defclass time-handler ()
    ((%identifier :initarg :identifier :initform (error "Identifier required.") :accessor identifier)
     (%launcher-function :initarg :launcher-function :initform (error "Launcher function required.") :accessor launcher-function)
     (%handler-function :initarg :handler-function :initform (error "Handler function required.") :accessor handler-function)
     (%active-timers :initarg :active-timers :initform () :accessor active-timers)
     (%handler-lock :initarg :handler-lock :initform (make-lock) :accessor handler-lock)
  
negative.code:               do (destroy-thread thread)))
        (remhash identifier *timer-map*))))
  
  (defun set-timer-function (identifier handler-function &key (type :multiple) (arguments () a-p) docstring)
    ""
    (assert (symbolp identifier) () "IDENTIFIER has to be a symbol.")
    (when (time-handler identifier)
      (v:debug :timer "Redefining handler ~a" identifier)
      (when (active-timers (time-handler identifier))
        (v:warn :timer "Redefining running timer ~a" identifier)))
    (unless a-p
      (setf arguments (cdr (function-arguments handler-function))))
    (setf (time-handler identifier)
          (make-instance 'time-handler 
                         :identifier identifier :handler-function handler-function
                         :timer-type type :docstring docstring)))
  
  (defgeneric apropos-time-handler (handler)
    (:documentation "")
  