Desktop Functions: Smart Device Functions:
|
GetTickCount (kernel32)
C# Signature:
[DllImport("kernel32.dll")] User-Defined Types:None. Notes:None. Tips & Tricks:Please add some! Sample Code:// C# sample for a simple timer to pause before some other code. // Just call pPause(delay) where delay is the number of milliseconds. e.g. pPause(1000) will pause for 1 second. [ DllImport( "kernel32.dll" ) ] public static extern long GetTickCount(); // Function to simply pause before returning to other code private void pPause(long delay) {
long entryTick = GetTickCount(); } Alternative Managed API:Do you know one? Please contribute it! System.Environment.TickCount() Note, the managed API is subtly different than the Win32 API call. The Win32 API call returns an unsigned int while the managed API returned a signed int. Also note that the MSDN documentation for System.Environment.TickCount() is not correct. This managed API rolls over to int.MinValue and not to 0 after 24.9 days. Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|