I was trying to measure the execution times of the c programs for efficiency by executing the .exe as process in C# and finding the time with TotalProcessorTime property.
But the problem i have been facing is that, when i run the process for more than a couple times, the TotalProcessorTime property is turned to zero.Even though the program executes completely.
I tried to create a separate thread and run the process on that, but
even then same problem persists.
Can anyone tell me why ? or if there is better way to measure the execution time.
P.S Stopwatch,Timer are much worse, they have a very large variation.