title: Xamarin Handler.Post does not invoke IRunnable.Run()
body: <p>I am trying to run this Android code in Xamarin:</p>
  
  <pre><code>final Handler handler = new Handler();
  handler.post(new Runnable() {
      @Override
      public void run() {
      int hours = seconds/3600;
      int minutes = (seconds%3600)/60;
      int secs = seconds%60;
  
      String time = String.format("%d:%02d:%02d", hours, minutes, secs);
      timeView.setText(time);
      if (running) {
          seconds++;
      }
      handler.postDelayed(this, 1000);
      }
  });
  </code></pre>
  
  <p>I have tried this in Xamarin;</p>
  
  <pre><code>Test newTest = new Test(this);
  Handler handler = new Handler();
  handler.Post(newTest);
  </code></pre>
  
  <p>Test class is <code>IRunnable</code> as</p>
  
  <pre><code>public class Test : IRunnable
  {
      MainActivity activity;
      public Test(MainActivity test)
      {
          activity = test;
      }
  
      public IntPtr Handle
      {
          get
          {
              return (IntPtr)0;
          }
      }
  
      public void Dispose()
      {
  
      }
  
      public void Run()
      {
          Console.WriteLine("--------------------&gt;Run called&lt;-----------------------");
          TextView stopWatch = activity.getTextView();
          int hour = activity.seconds / 3600;
          int minute = (activity.seconds % 3600) / 60;
          int sec = activity.seconds % 60;
  
          string time = string.Format("%d:%02d:%02d", hour, minute, sec);
          stopWatch.Text = time;
  
          if (activity.running == true)
          {
              activity.seconds++;
          }
  
          Handler handler = new Handler();
          handler.PostDelayed(this, 1000);
      }
  }
  </code></pre>
  
  <p>The program runs but <code>Handler</code> is not calling the <code>Run()</code> function. I am new to Xamarin. Any solutions?</p>