added a has_expired method to Timer class