To fix #739 and #632, we need to simplify the code, as there seems to be a lot of duplication between files. Having a centralised module in charge of timing could help remove bugs or at least concentrate them in one place.
This issue is exploratory work as it might not be possible to do so.