UserTiming is one of the W3C specs that I helped design while working at Microsoft through the W3C WebPerf working group. It helps developers measure the performance of their web applications by giving them access to high precision timestamps. It also provides a standardized API that analytics scripts and developer tools can use to display performance metrics.
So here it is: UserTiming.js
UserTiming.js is a polyfill that adds UserTiming support to browsers that do not natively support it.
UserTiming is accessed via the PerformanceTimeline, and requires
window.performance.now() support, so UserTiming.js adds a limited version of these interfaces if the browser does not support them (which is likely the case if the browser does not natively support UserTiming).
As of 2013-04-15, UserTiming is natively supported by the following browsers:
- IE 10+
- Chrome 25+ (prefixed)
UserTiming.js has been verified to add UserTiming support to the following browsers:
- IE 6-9
- Firefox 3.6+ (previous versions not tested)
- Safari 4.0.5+ (previous versions not tested)
- Opera 10.50+ (previous versions not tested)
UserTiming.js will detect native implementations of UserTiming,
window.performance.now() and the PerformanceTimeline and will not make any changes if those interfaces already exist. When a prefixed version is found, it is copied over to the unprefixed name.