cleanup and add a delay in loop

The now and then checks every 10s,
but if the loop is faster than 1s then it does not
wait another 10s...