JSFiddle - React, Tailwind, and code Playground

JavaScript

let last = performance.now()
document.addEventListener('mousemove', function () {
  let now = performance.now()
  let span = now-last
	console.log('距离上一次mousemove过去了' + (now-last) +'毫秒')
  if(now - last < 10) throw new Error('TOO_SHORT')
  last = now
})