Use Date.now() instead of event.timeStamp, as the latter one does strange things in Firefox.