Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

count-down timer

Tags:

c#

.net

timer

My main problem is that I don't know how to search what I'm looking for in google,because I get different results(probably its not count-down timer).

I want to calculate how much time a function takes to be executed.The instructions take a long time in seconds to be executed(seconds,not miliseconds).

How to do it in C#/NET,example?

like image 856
Ivan Prodanov Avatar asked Aug 14 '26 04:08

Ivan Prodanov


2 Answers

You want to use the StopWatch.

See this question for more detail.

Is DateTime.Now the best way to measure a function's performance?

like image 76
David Basarab Avatar answered Aug 15 '26 19:08

David Basarab


If you are looking to find bottlenecks in you application you can check out the CLR Profiler as a starting point.

like image 29
heavyd Avatar answered Aug 15 '26 17:08

heavyd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!