(self)
| 230 | ) |
| 231 | |
| 232 | async def main_loop(self) -> None: |
| 233 | counter = 0 |
| 234 | should_exit = await self.on_tick(counter) |
| 235 | while not should_exit: |
| 236 | counter += 1 |
| 237 | counter = counter % 864000 |
| 238 | await asyncio.sleep(0.1) |
| 239 | should_exit = await self.on_tick(counter) |
| 240 | |
| 241 | async def on_tick(self, counter: int) -> bool: |
| 242 | # Update the default headers, once per second. |