Stopwatch
A .NET class that measures elapsed time accurately, used to time a piece of code.
In more detail
Stopwatch.StartNew() starts one and Elapsed reads it. It is fine for demonstrations, but real performance comparisons need a benchmark tool.
Related terms
- benchmark — A repeatable measurement of how long code takes, or how much it uses, under a fixed workload, or more broadly a standard point of comparison such as an industry average.
Taught in
- Async and Await: Managing Concurrency — Modern .NET Core, C# & Enterprise Microservices