Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 347 Bytes

File metadata and controls

11 lines (8 loc) · 347 Bytes

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();