(in-package :custom) (use-package :oli) ; a "list" of module names you can find in the file %Modeling_Dir%\personality\sd_customize\all_modules.dat (let ((custom-module-event-handler-load-time nil) (custom-module-event-handler-expire-time 10)) ;in seconds (defun custom-module-event-handler-start (&rest args) (declare (ignore args)) (setf custom-module-event-handler-load-time (get-universal-time)) (sd-unsubscribe-event *SD-INTERACTIVE-EVENT* 'custom-module-event-handler) (sd-subscribe-event *SD-INTERACTIVE-EVENT* 'custom-module-event-handler) ) (defun custom-module-event-handler-stop (&rest args) (declare (ignore args)) (sd-unsubscribe-event *SD-INTERACTIVE-EVENT* 'custom-module-event-handler) (setf custom-module-event-handler-load-time nil) ) (defun custom-module-event-handler (&rest args) (declare (ignore args)) (when custom-module-event-handler-load-time (when (> (- (get-universal-time) custom-module-event-handler-load-time) custom-module-event-handler-expire-time) (sd-module-deactivate "STEP") )) ) ) (sd-unsubscribe-event (sd-module-activation-event "STEP") 'custom-module-event-handler-start) (sd-unsubscribe-event (sd-module-deactivation-event "STEP") 'custom-module-event-handler-stop) (sd-subscribe-event (sd-module-activation-event "STEP") 'custom-module-event-handler-start) (sd-subscribe-event (sd-module-deactivation-event "STEP") 'custom-module-event-handler-stop)