A count-down timer that periodically checks a flag (to terminate the timer) using a supplied callable.