Timer for JavaScript implemented