You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import time
import timeout_decorator
@timeout_decorator.timeout(10)
def mytest():
print("hello")
for i in range(1, 10):
time.sleep(1)
print(f"{i}")
try:
mytest2()
except:
pass
@timeout_decorator.timeout(5)
def mytest2():
print("hello")
for i in range(1, 10):
time.sleep(1)
print(f"{i}")
if __name__ == "__main__":
mytest()
import time
import timeout_decorator
import asyncio
@timeout_decorator.timeout(5, use_signals=False)
async def main():
asyncio.sleep(10)
if name == 'main':
asyncio.run(main())
The text was updated successfully, but these errors were encountered: