use window.performance for more accurate timing