Fixed usage of performance.now, works on ipad, iphone