diff --git a/os-userland-example.rkt b/os-userland-example.rkt index cfb003c..1e1523c 100644 --- a/os-userland-example.rkt +++ b/os-userland-example.rkt @@ -17,7 +17,7 @@ (wait (message-handlers [`(request ,reply-addr ,pattern) (spawn (lambda () - (define answer (begin body ...)) + (define answer (let () body ...)) (send `(reply ,reply-addr ,answer)))) (loop)])))])) @@ -50,11 +50,9 @@ (define (sleep-driver) (rpc-service `(sleep ,msecs) (send `(display (Sleeping ,msecs))) - (wait (message-handlers) - (meta-message-handlers - [((time-evt (+ (current-time) msecs)) => now) - (send `(display "\n")) - now])))) + (define now (wait-until-time (+ (current-time) msecs))) + (send `(display "\n")) + now)) (define (main) (spawn display-driver)