From: Kevin Lamonte Date: Tue, 15 Aug 2017 19:56:51 +0000 (-0400) Subject: #18 Eliminate initial delay X-Git-Tag: fanfix-swing-0.0.1~12^2~13^2~238 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=2027327cd9f53c15082f3bec9b4bb953d858a53f;p=fanfix-swing.git #18 Eliminate initial delay --- diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index c0166b11..09f617ed 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.