Use window.performance API, with fallback to JS time.