diff options
Diffstat (limited to 'TUI/unix.jai')
| -rw-r--r-- | TUI/unix.jai | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/TUI/unix.jai b/TUI/unix.jai index dd53921..7a25b6b 100644 --- a/TUI/unix.jai +++ b/TUI/unix.jai @@ -266,6 +266,9 @@ OS_read_input :: (buffer: *u8, bytes_to_read: s64) -> bytes_read: s64, error: bo return bytes_read; } +// timeout_milliseconds +// 0: do not wait +// -1: wait indefinitely OS_wait_for_input :: (timeout_milliseconds: s32) -> is_input_available: bool { fds := pollfd.[ .{ fd = STDIN_FILENO, events = POLLIN, revents = 0 } ]; nfds := fds.count; |
