From 70d3b82ca7817a066120ff88deb8b56e90d454ca Mon Sep 17 00:00:00 2001 From: dam Date: Tue, 24 Oct 2023 21:27:58 +0100 Subject: Prototype of process_input that does not block reading. --- ttt.jai | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index c834bf1..8edc8b4 100644 --- a/ttt.jai +++ b/ttt.jai @@ -1227,14 +1227,19 @@ main :: () { key: TUI.Key = #char "d"; while(key != #char "q") { __mark := get_temporary_storage_mark(); - sleep_milliseconds(1000); + // sleep_milliseconds(1000); key = TUI.get_key(3000); if key != xx TUI.Keys.None print_character(key); else write_string("-"); set_temporary_storage_mark(__mark); } + print("Waiting 1s.."); + sleep_milliseconds(1000); + print("!\n\r"); + print("Stoping.."); TUI.stop(); + print("!\n\r"); return; } -- cgit v1.2.3