CMMotionManager Block update frequency for startDeviceMotionUpdatesToQueue:withHandler:
===

I wrote a quick app to better understand the accuracy of the update frequency of the subject method.  Anyone know what is going on at 60,61 and 62Hz? They are always updating at 35Hz.

Results of code below:

    2012-07-25 23:04:46.276 Motion[2030:4003] cycles: 35 count=35
    2012-07-25 23:04:46.282 Motion[2030:4503] cycles: 65 count=70
    2012-07-25 23:04:46.279 Motion[2030:1903] cycles: 62 count=35
    2012-07-25 23:04:46.277 Motion[2030:4203] cycles: 60 count=35
    2012-07-25 23:04:46.279 Motion[2030:1a03] cycles: 64 count=70
    2012-07-25 23:04:46.280 Motion[2030:4403] cycles: 61 count=35
    2012-07-25 23:04:46.284 Motion[2030:5d03] cycles: 66 count=70
    2012-07-25 23:04:46.294 Motion[2030:6307] cycles: 63 count=59

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        [self checkTheFrequencyWithInput:35.];
        [self checkTheFrequencyWithInput:60.];
        [self checkTheFrequencyWithInput:61.];
        [self checkTheFrequencyWithInput:62.];
        [self checkTheFrequencyWithInput:63.];
        [self checkTheFrequencyWithInput:64.];
        [self checkTheFrequencyWithInput:65.];
        [self checkTheFrequencyWithInput:66.];
    }

    - (void)checkTheFrequencyWithInput:(double)cycle{
    
        CMMotionManager *motionManager=[[CMMotionManager alloc]init];
        NSOperationQueue *aQueue=[[NSOperationQueue alloc]init];
    
        __block double timeDatum=0;
        __block int count=0;
    
        [motionManager setDeviceMotionUpdateInterval:1./cycle];
   
        [motionManager startDeviceMotionUpdatesToQueue:aQueue withHandler:^(CMDeviceMotion *motion, NSError *error) {
        
            if (motion){
            
                if (!timeDatum) timeDatum=[motion timestamp];
            
                if ([motion timestamp]>(timeDatum+1.)){
                    [motionManager stopDeviceMotionUpdates];
                    NSLog(@"cycles: %.0f count=%d",cycle,count);
                }
                else count=count+1;
            }
        }]; 
    }



 