From 4888031daf6711812fa2f45e780118ca8e61cdca Mon Sep 17 00:00:00 2001 From: Michael Scharf Date: Fri, 5 Oct 2007 00:06:54 +0000 Subject: [PATCH] better throttle --- .../tm/internal/terminal/speedtest/SpeedTestConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java index dba3bc2ed8d..b77ed9ab7e9 100644 --- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java +++ b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java @@ -80,10 +80,10 @@ public class SpeedTestConnection extends Thread { os.write(crnl); n+=line.length(); } - if(throttle>0) - sleep(throttle); // process at least this number of characters to update the UI if(line==null || n>bufferSize) { + if(throttle>0) + sleep(throttle); // we assume we get ASCII UTF8 bytes long t=System.currentTimeMillis(); T+=t-t0;