js stopwatch is not accurate : helloo im very new to js & jquery. i wrote a stopwatch(accuracy 0.1 second) code very quickly in js that seems it works correctly but the problem is after it reaches 10min it keeps being a couple of seconds behind (i compared it to a digital stopwatch) can anyone see the problem pls?


"im writing this part bcause stack told me that your post contains too much code blah blah blah..." 

    var i = 0,
        desi_s = 0,
        s2 = 0,
        s1 = 0,
        m2 = 0,
        m1 = 0;
    $("#start").click(function () {  //calling the start button
        $("#reset").click(function () {  //calling the reset button
            clearInterval(myInt);
            $("#reset").each(function(){
                $(this).html('');    
                this.style.backgroundColor = "transparent";
                this.style.borderColor = "transparent";
            });
            i = 0;
            desi_s = 0;
            s2 = 0;
            s1 = 0;
            m2 = 0;
            m1 = 0;
            $("#min2 ,#min1 ,#sec2 ,#sec1 ,#desi_sec").html(0);
        })
        i++;
        clearInterval(myInt);
        var myInt = setInterval(function () {
            if (i % 2 !== 0) {
                $("#start").html('stop');

                if (desi_s < 9) {
                    desi_s++;
                    $("#desi_sec").html(desi_s);
                } else {
                    desi_s = 0;
                    if (s2 < 9) {
                        s2++;
                        $("#sec2").html(s2);
                    } else {
                        s2 = 0;
                        $("#sec2").html(s2);
                        if (s1 < 5) {
                            s1++;
                            $("#sec1").html(s1);
                        } else {
                            s1 = 0;
                            $("#sec1").html(s1);
                            if (m2 < 9) {
                                m2++;
                                $("#min2").html(m2);
                            } else {
                                m2 = 0;
                                $("#min2").html(m2);
                                if (m1 < 5) {
                                    m1++;
                                    $("#min1").html(m1);
                                } else {
                                    m1 = 0;
                                    clearInterval(myInt);
                                }
                            }
                        }
                    }

                }

            } else {
                clearInterval(myInt);
                $("#start").html('start');
                $("#reset").each(function(){
                $(this).html('reset');    
                this.style.backgroundColor = "black";
                this.style.color = "white";
            });
            }
        }, 100);
    })