Checks the timer whether it has reached the activation delay.
(self)
| 13 | self.enabled = False |
| 14 | |
| 15 | def check_timer(self): |
| 16 | """Checks the timer whether it has reached the activation delay.""" |
| 17 | current_timestamp = int(time.time()) |
| 18 | timestamp_diff = current_timestamp - self.start_timestamp |
| 19 | |
| 20 | if timestamp_diff >= self.activation_delay: |
| 21 | self.enabled = True |
| 22 | |
| 23 | def reset_timer(self): |
| 24 | """Resets the timer and starts from the beginning.""" |