Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stopwatch.IsHighResolution == false on my machine. Why?

Sorry, it is always true! Edited...


I've just realised that Stopwatch.IsHighResolution returns false in my machine. Why? What is needed to it return true? What kind of hardware? MSDN do not say much about that.

Machine config: Win 7 x64; i7 930; 3x2 GB (tripple chanel); HD 500 GB 7200 RPM; Energy config CPU @ 100%


as requested: VS 2010; .NET 4.0; Win form application; debug mode (I will test in release now)


In release mode it returns true! :) well, sorry folks, actualy it is always true (debug and release).

like image 736
Pedro77 Avatar asked Nov 13 '22 01:11

Pedro77


1 Answers

It could be that you don't have permissions for the high-resolution performance counters or that your hardware doesn't have that feature to back the high-resolution performance counters.

like image 165
Peter Ritchie Avatar answered Nov 17 '22 00:11

Peter Ritchie