You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2020. It is now read-only.
In file ../site-packages/visual_common/rate_function.py:
Line 196:
dt = calledTime - self.lastEndRate # time spent in user code
But sometimes this results in dt becoming equal to zero.
Then, in line 199:
self.userTime = dt # the first time we have a user code time is self.count == 2
Now self.userTime is zero too.
But in line 152:
U = self.userTime
and later, in the same function, we have at line 163:
M = int(USER_FRACTION/U)
Which then will cause a ZeroDivision Error traceback
Proposed fix:
Add at line 13:
SMALLEST_FLOAT = sys.float_info.min
and at line 201:
if self.userTime == 0:
self.userTime = SMALLEST_FLOAT