comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: minimum timer event value?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: minimum timer event value? [message #21257] Mon, 14 August 2000 00:00
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"David Fanning" <davidf@dfanning.com> wrote in message
news:MPG.13ff53cf969ed50b989bbe@news.frii.com...
> Rick Towler (rtowler@u.washington.edu) writes:
>
>> I can't seem to generate events faster than maybe 2-3 per second
>> regardless of the value I set TIMER to. I certainly can slow it down
>> with values of 1,2,5 etc. but values of .3, .1, .01 all seem to create
>> events of the same delay (around 2-3 per second). I thought that this
>> may be processor dependent but the program seems to act the same on a
>> 300 MHz laptop and Dual 500 MHz desktop.
> ...
> But I do think the slowest of these variables is actually
> generating the event and putting it on the queue. 2-3
> per second sounds about right to me.

It sounds pretty slow to me! XINTERANIMATE uses widget timer events and it
runs along at 30 per second if the images are small. I regularly run my own
object graphics animator code at approx. 15 per second.

Re the minimum delay, I expect (but haven't checked) that on an Intel PC it
is equal to the granularity of the system timer, i.e. 55 ms.


---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
Re: minimum timer event value? [message #21262 is a reply to message #21257] Sat, 12 August 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Rick Towler (rtowler@u.washington.edu) writes:

> Is there a minimum value for the TIMER keyword of Widget_Control?
>
> I can't seem to generate events faster than maybe 2-3 per second
> regardless of the value I set TIMER to. I certainly can slow it down
> with values of 1,2,5 etc. but values of .3, .1, .01 all seem to create
> events of the same delay (around 2-3 per second). I thought that this
> may be processor dependent but the program seems to act the same on a
> 300 MHz laptop and Dual 500 MHz desktop.
>
> Is there a limit to the rate at which IDL can generate TIMER events or
> do I have a problem someplace else?

If you set the TIMER equal to 0, the event will go on
the queue immediately. How soon that event gets handled,
depends on several things: (1) how much more you do in the
event handler *after* you set the Timer event, (2) what
other events are in the queue and have to be processed
*before* the next timer event, (3) how fast your machine
is, etc.

But I do think the slowest of these variables is actually
generating the event and putting it on the queue. 2-3
per second sounds about right to me.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Bottom 10 IDL requests ;-) was: Re: Top 10 IDL Requests
Next Topic: Sound in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:52:10 PDT 2025

Total time taken to generate the page: 0.00559 seconds