Fix issue with "uneven" update_intervals

For example an update_interval of 30 is very likely to miss the zeroth
second because there's only a 1 in 30 chance that the update happens at
0, 30, 0, etc.

Therefore, remember the last second and look if the current second is
smaller. If this is true it means that the zeroth second was crossed.