diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-01-11 23:02:11 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-01-11 23:02:11 -0800 |
commit | 89a42dcea713b28e4bf1650e09e2332431f256c7 (patch) | |
tree | ca0227ea134398bd4c777a5c15f84a81a66022c7 | |
parent | dd5be871fa2e7e7b6e9d91faa6eab75dc225d2dd (diff) | |
download | mu-89a42dcea713b28e4bf1650e09e2332431f256c7.tar.gz |
539
Simpler to just always sleep, whether or not a character was received.
-rw-r--r-- | mu.arc | 9 |
1 files 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) |