Renamed sleep & sleep-until to process-sleep and process-sleep-until.
This commit is contained in:
parent
4f91395748
commit
238dceb380
|
@ -17,12 +17,9 @@
|
||||||
|
|
||||||
;;; Move this to somewhere else as soon as Marc published his SRFI
|
;;; Move this to somewhere else as soon as Marc published his SRFI
|
||||||
(define (continuation-capture receiver)
|
(define (continuation-capture receiver)
|
||||||
(call-with-current-continuation
|
((call-with-current-continuation
|
||||||
(lambda (k)
|
(lambda (cont)
|
||||||
(receiver (lambda (thunk)
|
(lambda () (receiver cont))))))
|
||||||
(call-with-values
|
|
||||||
thunk
|
|
||||||
k))))))
|
|
||||||
|
|
||||||
(define (continuation-graft cont thunk)
|
(define (continuation-graft cont thunk)
|
||||||
(cont thunk))
|
(cont thunk))
|
||||||
|
@ -678,9 +675,9 @@
|
||||||
; De-released -- not POSIX and not on SGI systems.
|
; De-released -- not POSIX and not on SGI systems.
|
||||||
; (define-foreign usleep (usleep (integer usecs)) integer)
|
; (define-foreign usleep (usleep (integer usecs)) integer)
|
||||||
|
|
||||||
(define (sleep secs) (sleep-until (+ secs (time))))
|
(define (process-sleep secs) (process-sleep-until (+ secs (time))))
|
||||||
|
|
||||||
(define (sleep-until when)
|
(define (process-sleep-until when)
|
||||||
(let* ((when (floor when)) ; Painful to do real->int in Scheme.
|
(let* ((when (floor when)) ; Painful to do real->int in Scheme.
|
||||||
(when (if (exact? when) when (inexact->exact when))))
|
(when (if (exact? when) when (inexact->exact when))))
|
||||||
(let lp ()
|
(let lp ()
|
||||||
|
|
Loading…
Reference in New Issue