1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

better throttle

This commit is contained in:
Michael Scharf 2007-10-05 00:06:54 +00:00
parent 5453da9558
commit 05762f33a7

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;