1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 07:05:24 +02:00

better throttle

This commit is contained in:
Michael Scharf 2007-10-05 00:06:54 +00:00
parent bd392c36c6
commit 4888031daf

View file

@ -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;