property of the
interface indicates the time at which a given event took place.
Previously, this timeStamp value was represented as a
which was a whole number of milliseconds since the
Starting with Chrome 49, timeStamp is a
value. This value is still a number of milliseconds, but with microsecond
resolution, meaning the value will include a decimal component.
Additionally, instead of the value being relative to the epoch, the value is
relative to the
i.e. the time at which the user navigated to the page.
To convert the a DOMHighResTimeStamp value to an absolute number
of milliseconds since the epoch (e.g., to get a value to pass to the
use event.timeStamp + performance.timing.navigationStart.
The following sample provides a rough approximation of mouse pointer velocity,
with a higher precision on browsers that support
DOMHighResTimeStamp. (In this contrived example, the difference
in resolution between DOMHighResTimeStamp and
DOMTimeStamp won't make a significantly affect the calculations,
since the change in pixel positions are relatively coarse.)