mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +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);
|
os.write(crnl);
|
||||||
n+=line.length();
|
n+=line.length();
|
||||||
}
|
}
|
||||||
if(throttle>0)
|
|
||||||
sleep(throttle);
|
|
||||||
// process at least this number of characters to update the UI
|
// process at least this number of characters to update the UI
|
||||||
if(line==null || n>bufferSize) {
|
if(line==null || n>bufferSize) {
|
||||||
|
if(throttle>0)
|
||||||
|
sleep(throttle);
|
||||||
// we assume we get ASCII UTF8 bytes
|
// we assume we get ASCII UTF8 bytes
|
||||||
long t=System.currentTimeMillis();
|
long t=System.currentTimeMillis();
|
||||||
T+=t-t0;
|
T+=t-t0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue