Implemented activity timer in JS.