instead of a test like this, it would be better to verify that if a task is supposed to repeat every N milliseconds, the side-effect of an execution is not seen N-1 milliseconds from scheduling the task, but it is seen after N milliseconds.