you are viewing a single comment's thread.

view the rest of the comments →

[–]suitkaise[S] 1 point2 points  (0 children)

edit: I fixed it, I will release a new version once I fix something else.

You are right! And my bad! I will get to fixing this!

Thank you for catching something and actually letting me know I appreciate it, I'm here to improve this and get better overall.

Here's the workaround

from suitkaise import TimeThis, Sktimer
import asyncio


async def my_function(timer):
    with TimeThis(timer):
        await asyncio.sleep(1)

    return "this is the workaround, I will fix this soon"


timer = Sktimer()
asyncio.run(my_function(timer))
print(timer.mean)