From 2027327cd9f53c15082f3bec9b4bb953d858a53f Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Tue, 15 Aug 2017 15:56:51 -0400 Subject: [PATCH] #18 Eliminate initial delay --- src/jexer/TApplication.java | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- 2.27.0