title: What is the difference between Timer and Runnable?
body: <p>I would like to know what exactly the difference is between these two classes, and when should I use each.</p>
  
  <p>I am asking this because I am wondering about this sample code:</p>
  
  <pre><code>mStatusChecker = new Runnable() {
          @Override
          public void run() {
              invalidate();
              mHandler.postDelayed(mStatuschecker, (long) increment * 1000);
          }
      };
  </code></pre>
  
  <p>If I put the <code>mHandler.postDelayed</code> line of code <strong>before</strong> <code>invalidate()</code>, the <code>Runnable</code> is executed at almost double the speed. I am wondering if a <code>Timer</code> could be used instead to fix this problem.</p>