Changeset 734


Ignore:
Timestamp:
Mar 27, 2004, 2:50:04 AM (21 years ago)
Author:
Gary Byers
Message:

Make EDITOR-SLEEP kind of work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/hemlock/src/rompsite.lisp

    r676 r734  
    655655(defun editor-sleep (time)
    656656  "Sleep for approximately Time seconds."
    657   #+maybe-someday
    658657  (unless (or (zerop time) (listen-editor-input *editor-input*))
    659     (internal-redisplay)
     658    ;(internal-redisplay)
    660659    (sleep-for-time time)
    661660    nil))
    662661
    663662(defun sleep-for-time (time)
    664   (let ((nrw-fun (device-note-read-wait
    665                   (device-hunk-device (window-hunk (current-window)))))
    666         (end (+ (get-internal-real-time)
    667                 (truncate (* time internal-time-units-per-second)))))
    668     (loop
    669       (when (listen-editor-input *editor-input*)
    670         (return))
    671       (let ((left (- end (get-internal-real-time))))
    672         (unless (plusp left) (return nil))
    673         (when nrw-fun (funcall nrw-fun t))
    674         (hemlock-ext:serve-event (/ (float left)
    675                                     (float internal-time-units-per-second)))))
    676     (when nrw-fun (funcall nrw-fun nil))))
     663  (timed-wait-for-key-event *editor-input* time))
    677664
    678665
Note: See TracChangeset for help on using the changeset viewer.