mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
better throttle
This commit is contained in:
parent
5453da9558
commit
05762f33a7
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue