stopwatch: deal with elapsed == 0 (for whatever reason)
This commit is contained in:
parent
c9f91bbd98
commit
ed90adc75c
@ -31,7 +31,7 @@ class StopWatch:
|
||||
units = ['s', 'ms', 'µs', 'ns']
|
||||
unit = 0
|
||||
elapsed = self.avg_elapsed(divider)
|
||||
while elapsed < 1:
|
||||
while 0 < elapsed < 1:
|
||||
elapsed *= 1000
|
||||
unit += 1
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user