The issue was in the probablities. The smaller the number of seconds is, the more likely it is that there are no print tasks ever performed, which means that you are dividing by zero