MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / CountdownTimer

Class CountdownTimer

utils/timer.py:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39
40class CountdownTimer:
41
42 def __init__(self, timeout):
43 self.timeout = timeout
44 self.start = time.time()
45
46 def elapsed(self):
47 return time.time() - self.start
48
49 def remainder(self):
50 return max(self.timeout - self.elapsed(), 0)

Callers 1

pyfa.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected