Method | Description | |
---|---|---|
ClearMinimumTimerResolution ( int period ) : void |
Clears a previously set minimum timer resolution established using SetMinimumTimerResolution. Call this function immediately after you are finished using the PrecisionTimer. You must match each call to SetMinimumTimerResolution with a call to ClearMinimumTimerResolution, specifying the same minimum resolution period in both calls. An application can make multiple SetMinimumTimerResolution calls as long as each call is matched with a call to ClearMinimumTimerResolution. This method is currently ignored under Mono deployments. |
|
Dispose ( ) : void |
Releases all the resources used by the PrecisionTimer object.
|
|
PrecisionTimer ( ) : System |
Initializes a new instance of the PrecisionTimer class.
|
|
SetMinimumTimerResolution ( int period ) : void |
Requests a minimum resolution for periodic timers such as the PrecisionTimer. Call this function immediately before using the PrecisionTimer and call ClearMinimumTimerResolution immediately after you are finished using the PrecisionTimer. You must match each call to SetMinimumTimerResolution with a call to ClearMinimumTimerResolution specifying the same minimum resolution period in both calls. An application can make multiple ClearMinimumTimerResolution calls as long as each call is matched with a call to ClearMinimumTimerResolution. This function affects a global Windows setting. Windows uses the lowest value (that is, highest resolution) requested by any process. Setting a higher resolution can improve the accuracy of time-out intervals in wait functions. However, it can also reduce overall system performance, because the thread scheduler switches tasks more often. High resolutions can also prevent the CPU power management system from entering power-saving modes. See timeBeginPeriod Windows API for more information. This method is currently ignored under Mono deployments. |
|
Start ( ) : void |
Starts the PrecisionTimer.
|
|
Start ( |
Starts the PrecisionTimer with the specified EventArgs.
|
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Releases the unmanaged resources used by the PrecisionTimer object and optionally releases the managed resources.
|
Method | Description | |
---|---|---|
Stop ( ) : void | ||
TimerEventCallback ( int id, int msg, int user, int param1, int param2 ) : void | ||
m_timer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void | ||
timeBeginPeriod ( int period ) : int | ||
timeEndPeriod ( int period ) : int | ||
timeGetDevCaps ( TimerCapabilities &caps, int sizeOfTimerCaps ) : int | ||
timeKillEvent ( int id ) : int | ||
timeSetEvent ( int delay, int resolution, TimerProc proc, |
public static ClearMinimumTimerResolution ( int period ) : void | ||
period | int |
/// Minimum timer resolution specified in the previous call to the |
return | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
return | void |
public static SetMinimumTimerResolution ( int period ) : void | ||
period | int | /// Minimum timer resolution, in milliseconds, for the application. A lower value specifies a higher (more accurate) resolution. /// |
return | void |
public Start ( |
||
userArgs | User defined event arguments to pass into raised |
|
return | void |