Fitness_QA_Bot / utils /general_utils.py
lstetson's picture
Upload folder using huggingface_hub
0685af6 verified
raw
history blame
332 Bytes
import time
def timeit(func):
def wrapper(*args, **kwargs):
start_time = time.time()
result = func(*args, **kwargs)
end_time = time.time()
execution_time = round(end_time - start_time, 2)
print(f"{func.__name__} took {execution_time} seconds.")
return result
return wrapper