title: Actual frequency of device motion updates lower than expected, but scales up with setting
body: <p>I am porting an app that I originally wrote using the accelerometer for IOS 3, to incorporate the new IOS 4 motion capabilities.</p>
  
  <p>While capturing motion, the application does little else - no graphics updates for example.</p>
  
  <p>I'm doing the following to set up motion updates, as a replacement for my previous use of the accelerometer. I do realize that I could rebuild to do my own polling using NSTimer or something, and may pursue that yet.</p>
  
  <blockquote>
  <code>
  [motionManager setDeviceMotionUpdateInterval:updateInterval];<br/>
  
  CMDeviceMotionHandler motionHandler = ^(CMDeviceMotion *motion, NSError *error) {<br/>
    [self processMotion:motion withError:error];<br/>
  };<br/><br/>
  
  [motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue] withHandler:motionHandler];
  </code></blockquote>
  
  <p>This works, but the update interval doesn't behave as expected. I've stripped out all execution code in the processMotion method, except for saving off timestamps in order to see what the real motion update rate is. I've tested this enough to prove to myself that it's repeatable, even the strange result for 1/40. The table below shows what I'm seeing:</p>
  
  <pre>
  updateInterval  actual events per second
  1.0/20.0        13
  1.0/30.0        27
  1.0/40.0        27
  1.0/50.0        34
  1.0/60.0        40
  1.0/70.0        57
  1.0/90.0        60
  1.0/100.0      74
  </pre>
  
  <p>Some notes:<br/>
  1. i'm sure that the update interval is being set properly, and have checked it after setting to confirm.  <br/><br/>
  2. I'm sure that I'm tracking every call of processMotion, there aren't any calls being made with nil CMDeviceMotion or other strangeness  <br/><br/>
  3. I'm not doing any significant processing that would block things, just waiting on motion events and recording them. This all worked perfectly fine as a delegate for the accelerometer  <br/><br/>
  4. the motion data is good, just too infrequently updated :)  <br/><br/>
  5. this is using ios 4.2 on an ipod touch 4th gen  <br/><br/>
  6. I've searched as best I can, haven't seen an explanation, though i have seen some reports of people seeing 50hz update frequency when requesting 60hz, which could be related.<br/><br/></p>
  
  <p>The next thing i'll try is setting up a dedicated queue for the processing instead of using the current queue, however I did want to see if this was a known behavior. I could understand if the update rate was bottlenecked somehow, but not sure why it would still scale up as shown if that was the case.<br/><br/>
  Again, I suppose I could rebuild to use NSTimer and do my own polling, but I'd like to understand why i'm seeing this, in case i'm fundamentally misunderstanding the Core Motion framework.</p>