Re: Accuracy of timestamping streamed data (code included - long)
Re: Accuracy of timestamping streamed data (code included - long)
- Subject: Re: Accuracy of timestamping streamed data (code included - long)
- From: j o a r <email@hidden>
- Date: Tue, 26 Sep 2006 00:25:57 +0200
On 25 sep 2006, at 23.25, Ricky Sharp wrote:
It would be interesting to see what happens if your
updateTabletCursor method just logs a timestamp and does nothing
else. Perhaps you'll see the drifting occur with just that "shell"
in place. It could also be the case where the duration of time
you're in updateTabletCursor may vary.
I would agree that the most likely reason you would see problems with
the accuracy of a scheduled timer is if the work you do in your
callback method requires more time than the interval between your
scheduled time intervals.
Verify that this is not the case by logging the time consumed in the
callback method!
Note that timers do not guarantee you a system that will always
fire exactly n time units apart.
And to add / clarify:
<http://developer.apple.com/documentation/CoreFoundation/Reference/
CFRunLoopTimerRef/index.htm>
"A repeating timer reschedules itself based on the scheduled firing
time, not the actual firing time. For example, if a timer is
scheduled to fire at a particular time and every 5 seconds after
that, the scheduled firing time will always fall on the original 5
second time intervals, even if the actual firing time gets delayed.
If the firing time is delayed so far that it passes one or more of
the scheduled firing times, the timer is fired only once for that
time period; the timer is then rescheduled, after firing, for the
next scheduled firing time in the future."
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden