datetime.now() is used in multiple places to determine state changes and also to calculate time periods. Because some subroutines determine a new value for "now", instead of using the same value as it's caller, small errors will occur in the times used. Accumulated these small errors in time result in small errors in the calculated constants.
datetime.now() is used in multiple places to determine state changes and also to calculate time periods. Because some subroutines determine a new value for "now", instead of using the same value as it's caller, small errors will occur in the times used. Accumulated these small errors in time result in small errors in the calculated constants.
A fix is to determine "now" only once per "run".
I will post a pull request soon.