Main Site Documentation

Help me to know the execution time


#1

I want to know the execution time of an iteration in my program I try to use

using system.diagnostics.stop watch
sw.start ()

sw.stop ()

but it displays an error


#2

What error? Is it saying something like NOT_IMPLEMENTED for example ? That alone should give you the answer.

Just use the system time and calculate the difference between two events. Use the ticks to get highest accuracy.


#3

the error
VS is can not know a library

using system.diagnostics.stop watch

knowing that I have the library System


#4

The .NET Micro Framework is only a subset of the Full .NET Framework, so some classes are not supported. Fortunately, there are several entries in Codeshare that can do what you want.

https://www.ghielectronics.com/community/codeshare/search?q=stopwatch


#5

:clap: thank you


#6

You can also try using Object Browser to look at the references to see what they expose.