What is the GetTickCount() equivalent in C#?

  • Thread starter Thread starter EOS
  • Start date Start date
Mattias,

Here is how the method for getting the tick count is declared in the
Enviroment class:

..method private hidebysig static int32 nativeGetTickCount() cil managed
internalcall

The following is the same method imported for PInvoke

..method public hidebysig static pinvokeimpl("kernel32.dll") int32
GetTickCount() cil managed

*internalcall* from the Environment class means that the method
implementation is provided form the CLR.

How do you know what is the implementation of this method?

In 17 days if I in meanwile don't restart my machine I'll give it a test :-)
 
Stoitcho,
How do you know what is the implementation of this method?

By looking at the source code of course. MVPSLP has its advantages.
It's also available in SSCLI, see SystemNative::GetTickCount in
clr\src\vm\comsystem.cpp.


Mattias
 
Hmm, Okay I believe you now :-). I should apply for this program. Somehow I
missed when it started.

Thanks,
 
Back
Top