title: AlarmManager setRepeating disregards the interval
body: <p>I use this code to setup an alarm in our business application:</p>
  
  <pre><code>private void setupAlarm() {
      final Context c = getApplicationContext();
      final AlarmManager alarm = 
          (AlarmManager) c.getSystemService(Context.ALARM_SERVICE);
      final Intent i = new Intent(c, AlarmReceiver.class);
      final PendingIntent sender = 
           PendingIntent.getBroadcast(c, 0, i, PendingIntent.FLAG_CANCEL_CURRENT);
      final long startFromNow = System.currentTimeMillis()+10000;
      final long timer = 5*60*1000;
      alarm.setRepeating(AlarmManager.RTC_WAKEUP, startFromNow, timer, sender);
  }
  </code></pre>
  
  <p>I cannot understand why the interval for the alarm is not respected. First alarm starts after 10 seconds (as expected), afterwards it starts every 2 minutes and a bit (122 seconds to 127 seconds), which is wrong. The interval is 5 minutes, or am I wrong?</p>
  
  <p>I use this exact code in a simpler application: one activity that sets the repeating alarm and the receiver just creates a log. There it works.</p>
  
  <p>What could make the AlarmManager act so different?
    I have tried to:</p>
  
  <ul>
  <li>use <code>set()</code> and in the alarm receiver use another <code>set()</code> for over 5 minutes: launch at 2 minutes</li>
  <li>use <code>setInexactRepeating()</code> instead of <code>setRepeating()</code>: launch at 2 minutes</li>
  </ul>
  
  <p>Any insight would be helpful. Thanks! </p>