Re: do pop up boxes stop all events?
- From: "Mike Williams" <mike@xxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Sep 2007 22:30:49 +0100
<tadamsmar@xxxxxxxxx> wrote in message news:1190234624.352486.13100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
From some experiments, I found that timers are not really
reliable in that a 10 ms interval timer does not try to maintain
a 100 hertz rate. I think it just gets requeued 10 ms after it
runs, or something like that.
You can show this in a simple test app
in Load:
cnt = Timer()*1000 'Number of milliseconds since mignight
Text1.Text = 0
And in the timer event:
cnt = cnt + Timer1.Interval
Text1.Text = clng (cnt - Timer()*1000)
Text1 will show an increasing negative value.
Have a look at what I said in an earlier response in this thread. The VB Timer Control simply cannot produce a 100 Hz frequency on many systems. It's not a problem with VB itself, but rather with the underlying OS timing mechanism that it relies on. In fact on some systems the best available frequency from it is about 18 Hz! (Win98). And on many XP and Vista systems you cannot get more than about 65 Hz. Also, the intervals themselves are not usually the same each time, especially on XP systems that produce the approximate 65 Hz rate, with some quite wide variations from one interval to the next. 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.
Mike
.
- Follow-Ups:
- Re: do pop up boxes stop all events?
- From: tadamsmar@xxxxxxxxx
- Re: do pop up boxes stop all events?
- References:
- VB5: do pop up boxes stop all events?
- From: tadamsmar@xxxxxxxxx
- Re: do pop up boxes stop all events?
- From: Mike Williams
- Re: do pop up boxes stop all events?
- From: tadamsmar@xxxxxxxxx
- Re: do pop up boxes stop all events?
- From: Mike Williams
- Re: do pop up boxes stop all events?
- From: tadamsmar@xxxxxxxxx
- Re: do pop up boxes stop all events?
- From: Mike Williams
- Re: do pop up boxes stop all events?
- From: tadamsmar@xxxxxxxxx
- Re: do pop up boxes stop all events?
- From: tadamsmar@xxxxxxxxx
- Re: do pop up boxes stop all events?
- From: dpb
- Re: do pop up boxes stop all events?
- From: Jim Mack
- Re: do pop up boxes stop all events?
- From: dpb
- Re: do pop up boxes stop all events?
- From: tadamsmar@xxxxxxxxx
- VB5: do pop up boxes stop all events?
- Prev by Date: Re: converting single to integer
- Next by Date: Using the Interbase API
- Previous by thread: Re: do pop up boxes stop all events?
- Next by thread: Re: do pop up boxes stop all events?
- Index(es):
Relevant Pages
|