JS stopwatch - base