Commit 2f43f12b authored by Dave Cooper's avatar Dave Cooper

hacked CCL to avoid overflow of sleep value

parent 892049dc
......@@ -206,3 +206,23 @@ Perhaps a zombie process is holding port ~a?~%" port port))
(in-package :ccl)
(let (*warn-if-redefine-kernel*)
(defun %windows-sleep (millis)
(dotimes (n 3)
(unless (typep millis '(unsigned-byte 32))
(setq millis (/ millis 100))))
(do* ((start (floor (get-internal-real-time)
(floor internal-time-units-per-second 1000))
(floor (get-internal-real-time)
(floor internal-time-units-per-second 1000)))
(millis millis (- stop start))
(stop (+ start millis)))
((or (<= millis 0)
(not (eql (#_SleepEx millis #$true) #$WAIT_IO_COMPLETION)))))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment