Initial project import

This commit is contained in:
Agila Forge Importer committed 2026-07-13 15:20:32 +00:00
commit 23f2d29e32
11957 files changed
+1754577

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
module main
import term
import time
fn main() {
unbuffer_stdout()
println('Press Ctrl-D or ESC to exit.')
term.enable_echo(false)
mut frame := 0
for {
print('\r${time.now()} | frame: ${frame:06} | ')
x := term.key_pressed()
if x in [i64(0), 4, 27] {
// pressing Ctrl-D or ESC exits the loop
// Ctrl-D mean EOF sometimes, so return 0
break
}
if x > 0 {
println('${x:08x}')
}
time.sleep(16 * time.millisecond)
frame++
}
term.enable_echo(true)
println('done')
}