* Adds an rtt sample to the end of the circular buffer * When `windowSize` samples have been collected, `addSample` overwrites the least recently added * sample
(sample: number)
| 715 | * sample |
| 716 | */ |
| 717 | addSample(sample: number) { |
| 718 | this.rttSamples[this.writeIndex++] = sample; |
| 719 | if (this.length < this.rttSamples.length) { |
| 720 | this.length++; |
| 721 | } |
| 722 | |
| 723 | this.writeIndex %= this.rttSamples.length; |
| 724 | } |
| 725 | |
| 726 | /** |
| 727 | * When \< 2 samples have been collected, returns 0 |
no outgoing calls
no test coverage detected