(self, timeout: int, callback: Callable[[], Awaitable])
| 54 | blocker: int |
| 55 | |
| 56 | def __init__(self, timeout: int, callback: Callable[[], Awaitable]): |
| 57 | self.timeout = timeout |
| 58 | self.callback = callback |
| 59 | self.last_activity = time.time() |
| 60 | self.can_timeout = asyncio.Event() |
| 61 | self.can_timeout.set() |
| 62 | self.blocker = 0 |
| 63 | |
| 64 | def register_activity(self): |
| 65 | self.last_activity = time.time() |