MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / check_timer

Method check_timer

python/ctrlboard/src/menu/timer.py:15–21  ·  view source on GitHub ↗

Checks the timer whether it has reached the activation delay.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers 3

updateMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected