New delay algorithm.

delay refreshes itself at the beginning of each hour (to prevent the
delay becoming (almost) indefinitely large).