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.)
Your mouse velocity, in pixels per second: