A simple Javascript timer.