A very simple timer for Javascript using request animation frame.