X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWidget.java;fp=src%2Fjexer%2FTTerminalWidget.java;h=f488320c463ba9e30be64a8c77864762a5418f83;hp=acd1cc2761b94acec9a31b62e054ac0931990e9f;hb=5ca5f8e5310b189232ed337643f3b7b2ce6cd3b1;hpb=8d3480c7b92b79c8e774261fd6a8fe719286cf67 diff --git a/src/jexer/TTerminalWidget.java b/src/jexer/TTerminalWidget.java index acd1cc2..f488320 100644 --- a/src/jexer/TTerminalWidget.java +++ b/src/jexer/TTerminalWidget.java @@ -999,6 +999,19 @@ public class TTerminalWidget extends TScrollableWidget } // synchronized (emulator) } + /** + * Wait for a period of time to get output from the launched process. + * + * @param millis millis to wait for, or 0 to wait forever + * @return true if the launched process has emitted something + */ + public boolean waitForOutput(final int millis) { + if (emulator == null) { + return false; + } + return emulator.waitForOutput(millis); + } + /** * Check if a mouse press/release/motion event coordinate is over the * emulator.