title: Timer/hourglass wont stop
body: <p>I tried the same thing with the timer but still not working</p>
  
  <p>Everytime I try to start the timer , it works
  but when I try to click again the button and cancel the countdown,
  it is not stopping or cancelling.</p>
  
  <p>Here is my code:</p>
  
  <pre class="lang-java prettyprint-override"><code>public void timer(final Button btnBooking) {
  
      Hourglass hourglass = new Hourglass(5000, 1000) {
          @Override public void onTimerTick(long timeRemaining) { // Update UI
              btnBooking.setText("CANCEL " + "(" + timeRemaining + ")");
          }
  
          @Override public void onTimerFinish() { // Timer finished
              if (isBooking) {
                  btnBooking.setText("CANCEL");
              }
              listener.startBooking();
          }
      };
  
      if (!isBooking) {
          hourglass.startTimer();
          isBooking = true;
      } else {
          isBooking = false;
          hourglass.stopTimer();
          btnBooking.setText("BOOK");
      }
  
  }
  </code></pre>