A timer in javascript.