when a timer expires, why not just reset it to the equivalent of 24 hours?
an explanation of the posted code would help