There are three solutions to the race condition where time can move one second
during the test and thus return a different scheduling delay:
Accept both (delay) and (delay - 1) as valid results
Freeze the time at the moment of the test
Delete the tests depending on system time
The tests are useful, so 3. is wrong. 2. would be complicated and wouldn't
test the real procedure. Returning 9 or 10 for a delay of 10 is a valid result
that can occur even in real world. Thus I have decided to use solution 1.
This fixes the issue found in #20.
There are three solutions to the race condition where time can move one second during the test and thus return a different scheduling delay:
The tests are useful, so 3. is wrong. 2. would be complicated and wouldn't test the real procedure. Returning 9 or 10 for a delay of 10 is a valid result that can occur even in real world. Thus I have decided to use solution 1.