title: Battery Monitoring updates at uneven intervals
body: <p>I am monitoring for battery events <code>UIDeviceBatteryLevelDidChangeNotification</code> and <code>UIDeviceBatteryStateDidChangeNotification</code>. I am looking specifically for <strong>20%</strong> and <strong>10%</strong>, however, I am seeing these events fire off at 23%, 13% which they should be hitting at <strong>0.05</strong> intervals or every <strong>5%</strong>. </p>
  
  <h2>Question</h2>
  
  <p>Does anyone else experience this, or is there a better way to ensure the levels are more accurate?</p>
  
  <h2>Example</h2>
  
  <pre><code>-(void)startMonitoringForBatteryChanges
  {
      // Enable monitoring of battery status
      [[UIDevice currentDevice] setBatteryMonitoringEnabled:YES];
  
      // Request to be notified when battery charge or state changes
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkBatteryStatus) name:UIDeviceBatteryLevelDidChangeNotification object:nil];
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkBatteryStatus) name:UIDeviceBatteryStateDidChangeNotification object:nil];
  }
  
  - (void)checkBatteryStatus
  {
      float warningLevel = [[UIDevice currentDevice] batteryLevel] * 100;
  
      if ( warningLevel == 20.0 ) // 20%
      {
          NSLog(@"20% Warning.");
      }
  
      if ( warningLevel == 10.0 ) // 10%
      {
          NSLog(@"10% Warning.");
      }
  }
  </code></pre>