Stopwatch developed by me is lagging behind other standard stopwatch by 8-10 seconds & increases
<p>I have developed a stopwatch in Android . The stopwatch has the feature of Lap calculation too.</p>

<p>I have started the stopwatch . I tested the stopwatch developed by me with multiple standard stopwatches . The problem is that after 1 minutes , the stopwatch developed keeps lagging behind the other stopwatches &amp; the difference keeps on increasing. I got around 8-10 seconds lagging after the 3 minutes.</p>

<p>The following code I am using:</p>

<p>Two classes I am using , one for the Stopwatch implementation &amp; the other for Stopwatch display</p>

<p><strong>StopwatchImplementation.java</strong></p>

<pre><code>        /** The timer used to implement the Stopwatch logic. */
                private Timer mSWatch = null;
                /**
                     * Starts the Stopwatch.
                     */
                    public void watchStart() {
                        if (mSWatch != null)
                            mSWatch .cancel();
                        mSWatch = new Timer();
                        mSWatch .schedule(new TimerTask() {
                            @Override
                            public void run() {
                                mListener.updateUIThread();
                            }

                        }, 0, 100);

                    }

    /** Runnable The Timer_ tick where the time is updated */
        Runnable Timer_Tick = new Runnable() {
            public void run() {
                updateTime(); // Updates the time , calculates the lap duration
            }
        };


    private int mHours = 0;

    /** The mins. */
    private int mMins = 0;

    /** The secs. */
    private int mSecs = 0;

    /** The fraction of a sec. */
    private int mFSec = 0;

    /** The lap hours. */
    private int mLapHours = 0;

    /** The lap mins. */
    private int mLapMins = 0;

    /** The lap secs. */
    private int mLapSecs = 0;

    /** The lap fraction of sec.... 1/10th of a sec*/
    private int mLapFSec = 0;

public void updateTime() {

        try {

            mLapFSec++;
            if (mLapFSec &gt;= 10) {
                mLapFSec = 0;
                mLapSecs++;
                if (mLapSecs &gt;= 60) {
                    mLapSecs = 0;
                    mLapMins++;
                    if (mLapMins &gt;= 60) {
                        mLapMins = 0;
                        mLapHours++;
                    }
                }
            }

            mFSec++;
            if (mFSec &gt;= 10) {
                mFSec = 0;
                mSecs++;
                if (mSecs &gt;= 60) {
                    mSecs = 0;
                    mMins++;
                    if (mMins &gt;= 60) {
                        mMins = 0;
                        mHours++;
                    }
                }
            }
}
</code></pre>

<p><strong>StopwatchScreen.java</strong></p>

<pre><code>StopwatchImplementation mStopWatch = new StopwatchImplementation(this);


/**
     * Update ui thread.
     */
    public void updateUIThread() {

        StopWatchScreen.this.runOnUiThread(mStopWatch.Timer_Tick);
    }

public void startPressed() {


        mStopWatch.watchStart();

    }
</code></pre>

<p>Kindly provide any inputs regarding where the calculation is going wrong.</p>

<p>Thanks in advance.</p>

<p>Warm Regards,</p>

<p>CB</p>
