Skip to main content
net10.0net11.0

Stopwatch without any allocation

Published
Nov 8, 2026
10d ago
Total Downloads
188.3K
188,276

Install

dotnet add package Meziantou.Framework.ValueStopwatch --version 3.0.4
ProductVersions
.NET
net10.0net11.0

README

Meziantou.Framework.ValueStopwatch

Meziantou.Framework.ValueStopwatch provides ValueStopwatch, a simple equivalent of Stopwatch, but as a struct. It helps reduce allocations.

// Start a new stopwatch
ValueStopwatch stopwatch = ValueStopwatch.StartNew();

// Get elapsed time
TimeSpan elapsedTime = stopwatch.GetElapsedTime();

Changes from Previous Version

No structural changes between v3.0.3 and v3.0.4.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.