From: Kevin Lamonte Date: Tue, 15 Aug 2017 19:56:51 +0000 (-0400) Subject: #18 Eliminate initial delay X-Git-Url: http://git.nikiroo.be/?a=commitdiff_plain;h=2027327cd9f53c15082f3bec9b4bb953d858a53f;p=nikiroo-utils.git #18 Eliminate initial delay --- diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index c0166b1..09f617e 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -931,10 +931,16 @@ public class TApplication implements Runnable { * Run this application until it exits. */ public void run() { + boolean first = true; + while (!quit) { // Timeout is in milliseconds, so default timeout after 1 second // of inactivity. long timeout = 1000; + if (first) { + first = false; + timeout = 0; + } // If I've got no updates to render, wait for something from the // backend or a timer.