Ignore:
Timestamp:
10/07/03 14:30:16 (19 years ago)
Author:
piso
Message:

update-check-enabled.lisp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/examples/init.lisp

    r4237 r4240  
    11;;; init.lisp
    2 ;;; $Id: init.lisp,v 1.13 2003-10-07 02:08:35 piso Exp $
     2;;; $Id: init.lisp,v 1.14 2003-10-07 14:30:16 piso Exp $
    33
    44;;; ~/.j/init.lisp (if it exists) is loaded automatically when j starts up.
     
    7070                                 "{annie}mail/linux-kernel")))
    7171
    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   (loop
    80     (sleep 60) ; 1 minute
    81     (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 
    9372(when (probe-file "/home/peter/.j/key-pressed.lisp")
    9473  (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.