Re: Is delphi a good introduction to programming?



On Sat, 14 May 2005 13:18:46 +1200, Nicholas Sherlock
<n_sherlock@xxxxxxxxxxx> wrote:

>J French wrote:
>> I wonder whether there is a way of getting a higher resolution message
>> pump
>
>You could probably use multimedia timers. No messages are sent, but you
>could easily write a callback which sets a "Continue" flag for your
>loop. From the windows SDK:
>
>"About Multimedia Timers
>Multimedia timer services allow applications to schedule timer events
>with the greatest resolution (or accuracy) possible for the hardware
>platform. These multimedia timer services allow you to schedule timer
>events at a higher resolution than other timer services.

>These timer services are useful for applications that demand
>high-resolution timing. For example, a MIDI sequencer requires a
>high-resolution timer because it must maintain the pace of MIDI events
>within a resolution of 1 millisecond.

>Applications that do not use high-resolution timing should use the
>SetTimer function instead of multimedia timer services. The timer
>services provided by SetTimer post WM_TIMER messages to a message queue,
>while the multimedia timer services call a callback function.
>Applications that want a waitable timer should use the
>CreateWaitableTimer function. "

Ain't the SDK grand

<quote>
The timer services provided by SetTimer post WM_TIMER messages to a
message queue,
</quote>

Er... no, SetTimer gives you both options
- no HWND and give a lpTimerFunc then it uses Callback

Comical how misleading the documentation can be.

I think I remember that the multimedia timer hops in on a different
thread

An MSDN search on timeSetEvent is interesting

.



Relevant Pages

  • Re: I need a Class 101 on threading in VB6
    ... The Timer control is a system timer which will both limit it's ... You could try a multimedia timer, which runs in it's own thread. ... etc so will crash the IDE). ...
    (microsoft.public.vb.general.discussion)
  • Re: timers
    ... You can, however, use a multimedia timer which has a minimum period of 1ms, ... Judging by my printf's in DoTimer() function, ... milliseconds it goes off every 31 milliseconds. ...
    (microsoft.public.vc.mfc)
  • Somthing about timers
    ... This is for giving some information on Timer. ... It is going to take almost 50% of CPU utilization. ... the minimum delay of sleep. ... First make the multimedia timer get triggered in every 16ms keep on ...
    (microsoft.public.vc.mfc)
  • Re: do pop up boxes stop all events?
    ... a 100 hertz rate. ... And in the timer event: ... cnt = cnt + Timer1.Interval ... If you want better resolution and consistent intervals you would be better off constructing a multimedia timer in code, or using one of the many hires multimedia timers that are available as freeware on various sites, including VBAccelerator. ...
    (microsoft.public.vb.general.discussion)
  • Re: Vista NTP tamed, but with a blunt object
    ... On my Vista 32 system the interpolated system time steps by +30/-30 ... started/stopped which changes the MM timer to higher resolution. ...
    (comp.protocols.time.ntp)

Loading