Changeset 10829


Ignore:
Timestamp:
Sep 22, 2008, 3:17:57 PM (11 years ago)
Author:
gb
Message:

Sleep interruptably/continuably on Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/time.lisp

    r10821 r10829  
    211211    (%nanosleep secs nanos))
    212212  #+windows-target
    213   (let* ((millis (round (* seconds 1000))))
    214     (#_SleepEx millis 1)
    215     nil))
     213  (do* ((start (floor (get-internal-real-time)
     214                       (floor internal-time-units-per-second 1000))
     215               (floor (get-internal-real-time)
     216                       (floor internal-time-units-per-second 1000)))
     217         (millis (round (* seconds 1000)) (- stop start))
     218         (stop (+ start millis)))
     219       ((or (<= millis 0)
     220            (not (eql (#_SleepEx millis #$true) #$WAIT_IO_COMPLETION))))))
    216221
    217222
Note: See TracChangeset for help on using the changeset viewer.