Does Environment.TickCount pause when you hit a break point in visual studio? I was wondering as I am trying to get to the bottom of some performance issues in my code however I break at certain points to look at some values and was wondering if these breaks allow the ticks to continue or not as these will of course add to the totals if this is the case.
Does Environment.TickCount pause when you hit a break point in visual studio? I was
Share
No it does not. The value returned is the “A 32-bit signed integer containing the amount of time in milliseconds that has passed since the last time the computer was started.” (MSDN), that is a global counter inside Windows / the computer that does not stop when one application is suspended. It looks it is not even affected by the computer itself being suspend (hibernated) or a kernel debugger pausing the OS itself.
Actually, it might even be smaller than it was before you stopped on the breakpoint, given that it wraps around after ~24.9 days 😉