Skip to main content

cmtimer

Measures the execution time of a block of code. Uses perf_counter for the measurement. Behaves like a float (seconds) when printed or used within an arithmetic context.

Example

from cmtimer import Timer

with Timer() as time:
    # Three hours too soon or a minute too late?

print(f"Time taken: {time:.2f} s")

Installation

pip3 install cmtimer

Metadata

Release files for cmtimer 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmtimer 0.0.1
File Size Uploaded
cmtimer-0.0.1.tar.gz 2.1 kB Details

Release files / cmtimer-0.0.1.tar.gz

Download URL cmtimer-0.0.1.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6418eee420996da94bad3c22a1fc117ffb29af80bcb0624b661b3a6860fa9807
BLAKE2b-256 checksum
How to use checksums
69e5e0b462becea28569145226c0856a9b6cf21f50f1ed0b39dd67ae8a0ca419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page