def reset(self):
if self.state is not TimerState.stopped:<EOL><INDENT>if self.on_reset and self.state is TimerState.overflow:<EOL><INDENT>if callable(self.on_reset):<EOL><INDENT>self.on_reset()<EOL><DEDENT>else:<EOL><INDENT>execute(self.on_reset)<EOL><DEDENT><DEDENT>self.state = TimerState.stopped<EOL><DEDENT>
Stop timer and execute ``on_reset`` if overflow occured.