Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to stop stopwatch during debugging C# and vs2012

So i have some code that depends upon stopwatch for some calculations.

However once stopwatch starts it doesn't stop even during debugging and it is creating problems for me when i try to debug the code.

Is there any way that i can stop stopwatch from running during debugging. I am using VS2012.

like image 387
Win Coder Avatar asked Mar 24 '23 21:03

Win Coder


1 Answers

No you can't. Because a stopwatch isn't actually running like a thread that you could pause and resume. It's simply taking the time at start and the time at stop and calculating the difference.

Maybe if you post your code or concept, we could find a way to solve your problem without a stopwatch?

like image 151
nvoigt Avatar answered Apr 05 '23 22:04

nvoigt