© Andrey Akinshin 2019
Andrey AkinshinPro .NET Benchmarkinghttps://doi.org/10.1007/978-1-4842-4941-3_9

9. Hardware and Software Timers

Andrey Akinshin1 
Saint Petersburg, Russia

A man with a watch knows what time it is. A man with two watches is never sure.

—Segal’s law

There are a lot of useful benchmarking tools that can simplify your benchmarking life, but they are usually optional. You can use them or not depending on your preferences. But there is one tool that is essential for benchmarking: the timestamping API (methods that help you to get the current time). You can’t write a benchmark if you can’t get a timestamp. It’s critical to understand what kind of APIs you have on your system, how these APIs work internally, and what the main ...

Get Pro .NET Benchmarking: The Art of Performance Measurement now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.