On 27 Jul 2010, at 1:42 PM, Jeffrey Oleander wrote:
> Whatever happened to hardware monitoring and control
> of the CPU (core)?
They are there. In the kernel.
For user-space code, Darwin is not a real-time operating system. Period. Apple
has been saying so for ten years or more.
I'm not an exp
> On Mon, 2010/07/26, Kyle Sluder wrote:
>> Charlie Dickman <3tothe...@comcast.net> wrote:
>> As long as the NSTimer firing interval is
>> sufficiently small the NSTimer can be used.
>> If the run loop is stalled for any "significant:
>> time _all_ timers will be inaccurate to some
>> degree.
>
>
That depends on what you mean when you say "animation." NSTimer works
fine for triggering screen updates. But if your animation is
physics-based - a 3d "shooter" game, for instance - you'll want
something like the aforementioned mach_absolute_time to keep the
animation smooth.
sherm--
On Mon, Jul
On Mon, Jul 26, 2010 at 9:27 AM, Charlie Dickman <3tothe...@comcast.net> wrote:
> As long as the NSTimer firing interval is sufficiently small the NSTimer can
> be used. If the run loop is stalled for any "significant: time _all_ timers
> will be inaccurate to some degree.
This is untrue. mach_a
On Jul 26, 2010, at 9:27 AM, Charlie Dickman wrote:
> As long as the NSTimer firing interval is sufficiently small the NSTimer can
> be used. If the run loop is stalled for any "significant: time _all_ timers
> will be inaccurate to some degree. The NSTimer works fine for animation and ,
> e.g.
As long as the NSTimer firing interval is sufficiently small the NSTimer can be
used. If the run loop is stalled for any "significant: time _all_ timers will
be inaccurate to some degree. The NSTimer works fine for animation and , e.g.,
alarm timers and they are consistent across platforms such
On Jul 26, 2010, at 8:32 AM, Charlie Dickman <3tothe...@comcast.net> wrote:
> Try using an NSTimer with a repeating timeout interval of, say, .001 (or
> anything smaller than your required accuracy), and countdown your time delta
> by the same amount each time the NSTimer fires and when you get
Try using an NSTimer with a repeating timeout interval of, say, .001 (or
anything smaller than your required accuracy), and countdown your time delta by
the same amount each time the NSTimer fires and when you get to zero you'll
have what you need.
On Jul 26, 2010, at 4:56 AM, Matt Gough wrote:
I need to calculate (with an accuracy of 0.1 of a second) a real-time time
interval. This interval should:
1. Not be affected by whether the system has been put to sleep and woken up
while timing. (i.e If I start the timer then sleep the Mac for an hour and wake
it up again, my interval should