This is a very simple timer for showing minutes and seconds. It could be used for a game or a test of some sort. The start functionality could be associated with when the user clicks on a button to start the game or test. The stop could be associated with when the game or test was completed.

The original source for the code was from a posting on stackoverflow.com, with some modifications. http://stackoverflow.com/questions/2400227/jquery-timer-implementation

The script uses the JavaScript setInterval() function. 

Here is the demo:

Here is the associated code:

var seconds = 0;
var minutes = 0;
var interval;

$("#start").click(function() {
    $("button").removeClass("active");
    $(this).addClass("active");
    interval = setInterval(showElapsedTime, 1000);
});

$("#stop").click(function() {
    $("button").removeClass("active");
    $(this).addClass("active");
    stopElapsedTime();
});

$("#reset").click(function() {
    $("button").removeClass("active");
    $(this).addClass("active");
    seconds = 0;
    minutes = 0;
    $('#seconds').html(seconds);
    $('#minutes').html(minutes);
    stopElapsedTime();
});

function showElapsedTime() {
    seconds += 1;
    if(seconds > 59) {
        ++minutes;
        seconds = 0;
    }
    $('#seconds').html(seconds);
    $('#minutes').html(minutes);
}

function stopElapsedTime() {
    clearInterval(interval);
}