aboutsummaryrefslogtreecommitdiff
path: root/ttt.jai
diff options
context:
space:
mode:
authordam <dam@gudinoff>2023-10-24 21:27:58 +0100
committerdam <dam@gudinoff>2023-10-24 21:27:58 +0100
commit70d3b82ca7817a066120ff88deb8b56e90d454ca (patch)
tree790bb209e207249a34ea55027f45c85076f181d8 /ttt.jai
parent456be46bc0d4d7a0643616c269fbcb2b6f935197 (diff)
downloadtask-time-tracker-70d3b82ca7817a066120ff88deb8b56e90d454ca.tar.zst
task-time-tracker-70d3b82ca7817a066120ff88deb8b56e90d454ca.zip
Prototype of process_input that does not block reading.
Diffstat (limited to 'ttt.jai')
-rw-r--r--ttt.jai7
1 files changed, 6 insertions, 1 deletions
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;
}