@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The timeBeginPeriod function sets the minimum timer resolution for an application or device driver. Used to manipulate the timer frequency. !!!!C# Signature: [DllImport("winmm.dll", EntryPoint="timeBeginPeriod")] public static extern uint MM_BeginPeriod(uint uMilliseconds); !!!!VB Signature: Declare Function timeBeginPeriod Lib "winmm.dll" (ByVal uPeriod As Integer) As Integer !!!!User-Defined Types: None. !!!!Notes: Also see Winmm.TimeGetTime (MM_GetTime) and Winmm.TimeEndPeriod (MM_EndPeriod) !!!!Tips & Tricks: Please add some! !!!!Sample Code: static void Main(string[] args) { StreamWriter oWriter = null; MM_BeginPeriod(1); // set timer resolution to 1ms => freq=1000Hz try { oWriter = new StreamWriter(@"ticks.txt"); // tickcount has resolution of 16.5ms, mmtime has 1ms for(int nLoop = 0; nLoop < 100000; nLoop++) oWriter.WriteLine("{0}: TickCount={1}, MMTime={2}", nLoop, Environment.TickCount, MM_GetTime()); } catch(IOException oException) { Console.WriteLine(oException.Message); } finally { if(oWriter != null) oWriter.Close(); } MM_EndPeriod(1); } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: timeBeginPeriod@msdn on MSDN
Edit winmm.timeBeginPe...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.