Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

relativityhd/stopuhr

Open more actions menu

Repository files navigation

stopuhr

A simple tool for measuring durations in Python.

Installation

You can install stopuhr via pip:

pip install stopuhr

However, uv is recommended for installing python packages:

uv add stopuhr

Usage

With stopuhr it is convinient to measure durations in Python:

import time
from stopuhr import stopwatch

with stopwatch("My Timer"):
    # Do something
    time.sleep(2)
>>> My Timer took 2.00s

@stopwatch("My Timer")
def my_function():
    # Do something
    time.sleep(2)

>>> My Timer took 2.00s

This library can much more than that. Visit the reference or example section for more details.

About

A simple tool for measuring durations in Python.

Resources

License

Stars

Watchers

Forks

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.