 <p>This is probably what you want (not completer code, just idea)</p> <pre><code>protected boolean mIsCountDownOn; private class CountDownTimer mCountDownTimer = new CountDownTimer(10000, 10000) { @Override public void onTick(long millisUntilFinished) { } @Override public void onFinish() { mIsCountDownOn = false; } }; </code></pre> <p>In foo</p> <pre><code>foo { if (mIsCountDownOn) { // less than 10 seconds since the last time foo is called mCountDownTimer.cancel(); } else { // more than 10 seconds since last call mIsCountDownOn = true; // will start the timer at the end of foo body // Code to save mTime to wherever you want to save it. } // Whatever else foo supposes to do mTime = // get the time now mCountDownTimer.start(); } </code></pre>