For some private projects, I use Stopwatch to measure performance.
But with the low number of call ElapsedMilliseconds that I want to measure, I end up with 0 ElapsedMilliseconds , which makes it difficult to calculate the average.
I was thinking of writing my own stopwatch class. It could calculate with ticks and give undefined ElapsedMicroseconds based on Stopwatch.ElapsedTicks and TimeSpan.TicksPerMillisecond . This will probably not be a very good way.
I definitely need something that is backed up by high-performance winapi counters, so datetime and that won't be enough.
Are there any other ideas?
source share