Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
grostaco
/
IRRA
like
1
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
IRRA
/
lib
/
utils
/
timer.py
grostaco
feat: add timer
9ebc77b
about 1 year ago
raw
Copy download link
history
blame
contribute
delete
Safe
165 Bytes
from
time
import
perf_counter
from
contextlib
import
contextmanager
@contextmanager
def
timer
():
start = perf_counter()
yield
lambda
: perf_counter() - start