Stats Property (ccrpStopWatch Object)

See Also  Examples  Applies to

Provides a class of information relevant to the current system's multimedia timer.

Syntax

ccrpTimer.Stats.Frequency[ = value As Long ]
ccrpTimer.Stats.Resolution[ = value As Long ]

value As Long = ccrpTimer.Stats.MaximumResolution
value As Long = ccrpTimer.Stats.MinimumResolution

Remarks

The Stats property of all ccrpTimers objects provides information regarding the current state of the system's multimedia timer and how the ccrpTimers library is using it.

Frequency

This property may be used to set or return the frequency of the multimedia timer being used by the ccrpTimers library. Internally, ccrpTimers runs off a single multimedia timer, and services all classes based on that timer. At initialization, this timer is set to fire once every 20 milliseconds, to avoid choking older hardware. To offer users the most frequent events possible, decrease this setting. However, if you find that you need events fired at a lower frequency, you can conserve CPU usage by setting ccrpTimers to use a higher frequency.

Important Note: All objects exposed by ccrpTimers library use a single timer, thus a single frequency! Optimization of your CPU usage is achieved by selecting the Highest Common Denominator of all timer objects to use as your desired Frequency.

Resolution

This property returns the functional resolution, or accuracy, of the multimedia timers requested by ccrpTimers library. Resolution is considered the accuracy with which timer events occur. For example, if you request a timer event every 100 milliseconds, and the system's minimum resolution is 5 milliseconds, the timer events will occur within a range of 95 to 105 milliseconds apart. The ccrpTimers library requests a resolution of 1 millisecond, although the Frequency may be varied. It is important to recognize that resolution requests are just that -- a request for a desired setting -- and are entirely dependent on the hardware being used.

MinimumResolution and MaximumResolution

These properties are provided for informational purposes only. They is a measure of the minimum and maximum resolutions, or accuracy, of the multimedia timer on the hardware being tested. Resolution is considered the accuracy with which timer events occur. For example, if you request a timer event every 100 milliseconds, and the system's minimum resolution is 5 milliseconds, the timer events will occur within a range of 95 to 105 milliseconds apart. Most modern PCs are capable of true 1 millisecond minimum resolution, and generally return 1,000,000 under NT and 65,535 under Windows 95 as their maximum resolution.

Data Type

ccrpTimerStats