stopwatch-manager 1.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package stopwatch-manager --version 1.0.4                
NuGet\Install-Package stopwatch-manager -Version 1.0.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="stopwatch-manager" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add stopwatch-manager --version 1.0.4                
#r "nuget: stopwatch-manager, 1.0.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install stopwatch-manager as a Cake Addin
#addin nuget:?package=stopwatch-manager&version=1.0.4

// Install stopwatch-manager as a Cake Tool
#tool nuget:?package=stopwatch-manager&version=1.0.4                

Stopwatch Manager for .NET

Have you ever had to record timings for a multi-threaded application and realized you needed to record the length of so many events that you actually need a collection of stopwatches instead of a single stopwatch? Yeah, me too.

That's why I developed the Stopwatch Manager for .NET. The package supports .NET 6 & 7, and it creates a concurrent dictionary of stopwatches, each with its own unique key for lookup.

Simply start a new stopwatch with a unique key name you haven't previously used, and a stopwatch gets added to the collection and is started. Stop, reset, or remove any stopwatch using the same key you used to start it.

The stopwatch manager supports Microsoft.Extensions.Logging and Serilog loggers and, by default, logs when a stopwatch is started or stopped. Elapsed time is logged when the watch is stopped, by default.

There are also options to suppress logging, as stopping a stopwatch also returns the elapsed time via an out TimeSpan parameter.

This may not be a library you'll ship to production, but it will help you get to production faster by allowing complex time recordings for operations you perform in your source code.

You can get a copy of this NuGet from the following location: https://www.nuget.org/packages/stopwatch-manager/

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.12 368 12/16/2022
1.0.11 373 12/12/2022
1.0.10 338 12/9/2022
1.0.9 338 12/8/2022
1.0.8 330 12/8/2022
1.0.7 347 12/7/2022
1.0.6 338 12/7/2022
1.0.5 355 12/7/2022
1.0.4 325 12/7/2022
1.0.3 344 12/6/2022
1.0.2 348 12/5/2022
1.0.1 358 12/5/2022
1.0.0 348 12/5/2022

- 1.0.0
Initial release
- 1.0.1
Updates to NuGet XML documentation
- 1.0.2
Automation of NuGet release notes
- 1.0.3
Added Restart(), LogStopwatchList(), and GetStopwatchKeys()