You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
439 B
Python

import asyncio
import base
from local import loop, noawait
async def test_timer1():
print("timer1")
async def test_timer2():
print("timer2")
async def main():
timer_id = noawait.add_timer(test_timer1, 1)
timer_id = noawait.add_timer(test_timer2, 2)
print("Timer id: %d" % timer_id)
while True:
await asyncio.sleep(1)
await noawait.end()
if __name__ == '__main__':
loop.run_until_complete(main())