Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual C++ Timers

Status
Not open for further replies.

sweep123

Technical User
May 1, 2003
185
0
0
GB
As I understand it, the standard timers are accurate to 55 msec.
e.g. SetTimer(TIMER1, 60, NULL);// Timer for the 60ms messages

Are they any high resolution timers available to say give an accuracy of 20 msec.

Sweep.
 
Take a look at QueryPerformanceCounter()

-pete
[sub]I just can't seem to get back my IntelliSense[/sub]
 
The Multimedia Timers API is incredibly easy to use. Look at timeSetEvent in the MSDN. Just specify a period, resolution and callback—it's that simple!

Will
 
The ietimer.ocx allows you to set the time in msec.
The ocx comes with Visual C++, and can be added to the tool
bar in your resource editor. From there, you can add it
to your dalog box (similar to adding a buton).

The maximum time that you can set is something like 65000 (65 sec). You can ovecome this by using a counter in your onTimer event function and reset the timer.

 
myperu,

You say the ocx comes with Visual C++, and can be added to the tool bar in your resource editor.

Can you provide more detals as I cant find it.
Note I am using MS Visual C++Version 6.0

Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top