title: Periodic actions in Live Wallpapers
body: <p>I'm trying to make sure I'm using the most efficient/proper code in my live wallpapers. Currently if I have any periodic action I just use Runnables to repeat the action and then after it's completed postDelay it for however long it needs to be.</p>
  
  <p>Is it better to only have one Runnable such as a drawFrame Runnable and just work off of that for any other periodic action?</p>
  
  <p>For example:</p>
  
  <pre><code>int interval1 = 0;
  int interval2 = 0;
  drawFrame(){
    interval1++;
    interval2++;
    if (interval1==repeatInt1){
      interval1 = 0;
      // Periodic action 1
    }
    if (interval2==repeatInt2){
      interval2 = 0;
      // Periodic action 2
    }
  // Regular drawFrame code here
  }
  </code></pre>
  
  <p>I would think the above method would use less resources than running 3 runnables, correct?</p>
  
  <p>To clarify, I have multiple actions (2 or more) that need to be executed periodically, but not necessarily all at the same delay. Would it be best to create a runnable of the shortest delay and then just use that as a central thread to execute the other actions after X amount of loops?</p>