in C/C++ we have a function clock() for keeping the current CPU clock for counting the time of execution programs:
t1 = clock()
for(...)
for(...)
t2 = clock()
printf (t2 - t1)
but how I can do it in C#? I know there is some codes:
long t1 = stopwatch.startnow()
for(...)
for(...)
t1.stop()
sum = t1.elapsedticks;
The problem is, that when I run codes in C, I see about 20 ticks, but when I run the same code in C#, I see about 60000 ticks. Please tell me that is it OK or not? Is my solution is true? Thanks a lot.