Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._vendor.rich._timer Namespace Reference

Functions

Generator[None, None, Nonetimer (str subject="time")
 

Detailed Description

Timer context manager, only used in debug.

Function Documentation

◆ timer()

Generator[None, None, None] timer ( str   subject = "time")
print the elapsed time. (only used in debugging)

Definition at line 13 of file _timer.py.

13def timer(subject: str = "time") -> Generator[None, None, None]:
14 """print the elapsed time. (only used in debugging)"""
15 start = time()
16 yield
17 elapsed = time() - start
18 elapsed_ms = elapsed * 1000
19 print(f"{subject} elapsed {elapsed_ms:.1f}ms")