title: How to implement CountDownTimer Class in Xamarin C# Android?
body: <p>I am new to Xamarin.Android framework. I am working on count down timer but unable to implement like  the <a href="http://developer.android.com/reference/android/os/CountDownTimer.html" rel="noreferrer">java <code>CountDownTimer</code>  class</a>. Could anybody please help me out to convert following java <a href="https://stackoverflow.com/questions/5113960/showing-time-on-progressbar-in-android">code</a> to C# Xamarin android code.</p>
  
  <pre><code>    bar = (ProgressBar) findViewById(R.id.progress);
      bar.setProgress(total);
      int twoMin = 2 * 60 * 1000; // 2 minutes in milli seconds
  
      /** CountDownTimer starts with 2 minutes and every onTick is 1 second */
      cdt = new CountDownTimer(twoMin, 1000) { 
  
          public void onTick(long millisUntilFinished) {
  
              total = (int) ((dTotal / 120) * 100);
              bar.setProgress(total);
          }
  
          public void onFinish() {
               // DO something when 2 minutes is up
          }
      }.start();
  </code></pre>