Simple Timer is a Python package for measuring the time spent on tasks or code execution.
Use the package manager pip to install Simple Timer:
pip install simple-timerHere's how to use the Simple Timer:
from simple_timer import SimpleTimer
import time
timer = SimpleTimer()
timer.start()
# Perform some tasks
time.sleep(3)
timer.pause()
timer.show_elapsed_time() # Output: Elapsed time: 00:00:03
- Start, pause, resume, and reset the timer.
- Get the elapsed time in hours, minutes, and seconds.
Orlando Gomes
This project is licensed under the MIT License.