wait
Returns whether a resize is needed to learn the terminal size.
Function parameters
Parameters
- timeout_ns:u64
Type definitions in this namespace
Types
- Node
- Represents one unit of progress.
Initializes a global Progress instance.
Functions
- start
- Initializes a global Progress instance.
- lockStdErr
- Allows the caller to freely write to stderr until `unlockStdErr` is called.
- lockStderrWriter
- Allows the caller to freely write to the returned `Writer`,
= switch (builtin.os.tag) { .wasi, .freestanding, .windows => false, else => true, }
Values
- have_ipc
- = switch (builtin.os.tag) { .wasi, .freestanding, .windows => false, else => true, }
Source
Implementation
fn wait(timeout_ns: u64) bool {
const resize_flag = if (global_progress.redraw_event.timedWait(timeout_ns)) |_|
true
else |err| switch (err) {
error.Timeout => false,
};
global_progress.redraw_event.reset();
return resize_flag or (global_progress.cols == 0);
}