Remove startup delay
This commit is contained in:
parent
9096f1dbf1
commit
f79170000e
1 changed files with 3 additions and 3 deletions
|
|
@ -37,9 +37,6 @@ fn main() -> Result<(), Error> {
|
|||
Terminal::with(move |term| {
|
||||
let mut needs_render = true;
|
||||
loop {
|
||||
// Wait for a while, or until an event occurs
|
||||
term.wait_at_least(Duration::from_millis(250));
|
||||
|
||||
while let Some(ev) = term.get_event() {
|
||||
needs_render = true; // TODO: Don't always rerender?
|
||||
|
||||
|
|
@ -64,6 +61,9 @@ fn main() -> Result<(), Error> {
|
|||
if needs_render {
|
||||
term.update(|fb| ui.render(&state, fb));
|
||||
}
|
||||
|
||||
// Wait for a while, or until an event occurs
|
||||
term.wait_at_least(Duration::from_millis(250));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue