Correct inf loop defect in fast clock init.

Each time delay is grown we need to reset elapsed.  We want to take
the most accurate sample from the set at fixed delay.

Without this we will hang if there is ever an insufficiently accurate,
high unit clock read.

Change-Id: Ic65f364067789ac85a6572d67af2d77528e265bb
Ta zmiana jest zawarta w:
%! (template.HTML=Sean Keely)złożyło 2022-04-01 16:15:37 -04:00
1 rodzic 03a52655a8
złożenie 4e9849034d
Plik 1 zmieniony
+3 -1
+3 -1
Wyświetl plik
@@ -57,9 +57,11 @@ fast_clock::init::init() {
// calibrate clock
fast_clock::raw_rep min = 0;
clock::duration elapsed = clock::duration::max();
clock::duration elapsed;
do {
elapsed = clock::duration::max();
for (int t = 0; t < 10; t++) {
fast_clock::raw_rep r1, r2;
clock::time_point t0, t1, t2, t3;