From 330721480f70bef721af5ff0c3d1a3f08cc8e6e5 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 21 Nov 2016 14:40:25 +1300 Subject: [PATCH] Finish conversion of poke.rkt to timestate --- racketmq/poke.rkt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/racketmq/poke.rkt b/racketmq/poke.rkt index 8a09571..bc21ddd 100644 --- a/racketmq/poke.rkt +++ b/racketmq/poke.rkt @@ -8,7 +8,7 @@ (require net/url) (require net/uri-codec) -(require/activate syndicate/drivers/timer) +(require/activate syndicate/drivers/timestate) (require/activate syndicate/drivers/web) (require (except-in "private/util.rkt" vh)) @@ -84,9 +84,8 @@ (printf "~a ==> ~a ~v ~v\n" id verb path body) (react (stop-when (message (web-response-complete id $resp $body)) (printf "~a <== ~v ~v\n" id resp body)) - (on-start (send! (set-timer (list 'incoming-tracer id) 1000 'relative))) - (stop-when (message (timer-expired (list 'incoming-tracer id) _)) - (printf "~a <== timeout\n" id))))) + (stop-when-timeout 1000 + (printf "~a <== timeout\n" id))))) (define (spawn-subscriber topic) (request! 'post `("hub" ())