Re: What happens with timers and slow functions?
Re: What happens with timers and slow functions?
- Subject: Re: What happens with timers and slow functions?
- From: p3consulting <email@hidden>
- Date: Mon, 22 Dec 2003 10:11:36 +0100
See
file:///Developer/Documentation/CoreFoundation/Reference/
CFRunLoopTimerRef/index.html
From the doc:
"A timer is not a real-time mechanism; it fires only when one of the
run loop modes to which the timer has been added is running and able to
check if the timers firing time has passed. If a timers firing time
occurs while the run loop is in a mode that is not monitoring the timer
or during a long callout, the timer does not fire until the next time
the run loop checks the timer. Therefore, the actual time at which the
timer fires potentially can be a significant period of time after the
scheduled firing time."
A repeating timer task taking longer than the timer's interval will
most probably makes you UI unusable... == the application will become
unresponsive to user actions
because at each execution of the run loop it will be time to fire the
timer...
Pascal Pochet
P3 Consulting
On 21 dic. 2003, at 13:35, Jonathan del Strother wrote:
>
I'm using an NSTimer to control physics / graphics updates to a
>
simulation.
>
>
What happens if the function that the timer calls takes longer to
>
execute than the timer's interval?
>
>
Will the timeout be ignored? Is the function call queued up
>
somewhere, so that even if I kill the timer, I'll receive a bunch of
>
timeouts while the queue empties? Or is the function call made
>
straight away, so it's running simultaneously to any previous function
>
calls?
>
>
Thanks,
>
Jon
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.