From 89a42dcea713b28e4bf1650e09e2332431f256c7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 11 Jan 2015 23:02:11 -0800 Subject: 539 Simpler to just always sleep, whether or not a character was received. --- mu.arc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mu.arc b/mu.arc index 731c6592..38325186 100644 --- a/mu.arc +++ b/mu.arc @@ -1867,13 +1867,10 @@ (default-space:space-address <- new space:literal 30:literal) (stdin:channel-address <- next-input) { begin + ; keyboard input is infrequent; sleep at the start of each iteration + (sleep for-some-cycles:literal 1:literal) (c:character <- read-key) - { begin - (break-if c:character) - ; no key; end this time slice - (sleep for-some-cycles:literal 1:literal) - (loop 2:blocks) - } + (loop-unless c:character) (curr:tagged-value <- save-type c:character) (stdin:channel-address/deref <- write stdin:channel-address curr:tagged-value) (loop) -- cgit 1.4.1-2-gfad0