I can't cancel my window when sleep-function is executed
Example:
(while (= 1 1) (sleep 60000) )
If I hit Ctrl-C, I must wait up to 60 sec
It is normal?
Only on UNIX it lets you break out during sleep. As a workaround try the following:
(define (mysleep ms)
(let (start (time-of-day))
(while (> (+ start ms) (time-of-day)) (sleep 10))))
Lutz
This code will let you break out with Ctrl-C
ps: note that 'time-of-day' wraps around at midnight
Thank Your. I will try.
for WINDOWS it is the same as
(while (= 1 1) (sleep 10) )
It is right?