Changeset 4240
- Timestamp:
- 10/07/03 14:30:16 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/examples/init.lisp
r4237 r4240 1 1 ;;; init.lisp 2 ;;; $Id: init.lisp,v 1.1 3 2003-10-07 02:08:35piso Exp $2 ;;; $Id: init.lisp,v 1.14 2003-10-07 14:30:16 piso Exp $ 3 3 4 4 ;;; ~/.j/init.lisp (if it exists) is loaded automatically when j starts up. … … 70 70 "{annie}mail/linux-kernel"))) 71 71 72 ;; In minutes.73 (defparameter check-enabled-timeout 5)74 75 ;; Don't resolve autoloads in the background thread!76 (sys::resolve 'get-internal-real-time)77 78 (defun update-check-enabled ()79 (loop80 (sleep 60) ; 1 minute81 (let* ((last-event-time (get-last-event-internal-time))82 (current-time (get-internal-real-time))83 (timeout (* check-enabled-timeout 60 internal-time-units-per-second))84 (enable (if (> current-time (+ last-event-time timeout)) nil t)))85 (unless (eql (variable-value 'check-enabled :global) enable)86 (setf (variable-value 'check-enabled :global) enable)87 (log-debug "check-enabled => ~A"88 (variable-value 'check-enabled :global))))))89 90 (defun start-update-check-enabled-thread ()91 (make-thread #'update-check-enabled))92 93 72 (when (probe-file "/home/peter/.j/key-pressed.lisp") 94 73 (load "/home/peter/.j/key-pressed.lisp")) 74 75 (when (probe-file "/home/peter/.j/update-check-enabled.lisp") 76 (load "/home/peter/.j/update-check-enabled.lisp"))
Note: See TracChangeset
for help on using the changeset viewer.