8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
This library is very handy but seems it can't be used with async fns - where it would be very helpful. Simple example:
import asyncio import time import codetiming @codetiming.Timer(name="my_func", initial_text='Started...', text="{name} complete in {:.4f} secs") def my_func(): time.sleep(5) print('done') @codetiming.Timer(name="my_async_func", initial_text='Started...', text="{name} complete in {:.4f} secs") async def my_async_func(): time.sleep(5) print('done') my_func() # timing ok... loop = asyncio.get_event_loop() loop.run_until_complete(my_async_func()) # timing 0.0 sec
This gives output:
Started... done my_func complete in 5.0052 secs Started... my_async_func complete in 0.0000 secs done
Is there a way to use it to correctly report the actual elapsed time for the async function somehow?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi
This library is very handy but seems it can't be used with async fns - where it would be very helpful. Simple example:
This gives output:
Is there a way to use it to correctly report the actual elapsed time for the async function somehow?
The text was updated successfully, but these errors were encountered: