Oh, okay. I thought timers set up some sort of interrupt routine  
(based on some sort of hardware sync signal like the vertical  
blanking, or a 1-ms hardware timer) or some such. I didn't know it  
already examined the system clock.

On Mar 31, 2007, at 9:26 PM, [EMAIL PROTECTED] wrote:

> On Apr 01, 2007, at 02:03 UTC, William Squires wrote:
>
>> There's nothing to prevent you from using two (or more) timers on
>> a window. Just keep in mind that timers YIELD time, they don't
>> measure it. The more processor resources you use up (i.e. by not
>> releasing time back to the OS's event loop - and that includes the
>> processing time taken to execute the timer's Action() event!), the
>> more likely it is that your timers will fire later than you think, so
>> if time accuracy is important, you may want to use a thread, or
>> decrease the period of the timers and check the actual system clock
>> (somehow) more often.
>
> This is a fair point, but note that decreasing the period of the  
> timers
> will probably not help accuracy.  A timer actually does watch the
> system clock; it's scheduled to fire at the correct time relative to
> whenever it fired last, and it'll do so unless your main thread is  
> tied
> up doing something else at the time.  And when that's the case, it'll
> fire as soon as your main thread finishes whatever it's doing and
> returns to the event loop.  So as you can see, a shorter period  
> doesn't
> make it any more accurate.
>
> Best,
> - Joe
>
> --
> Joe Strout -- [EMAIL PROTECTED]
> Verified Express, LLC     "Making the Internet a Better Place"
> http://www.verex.com/
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to