Skip to content

Instantly share code, notes, and snippets.

@Le-Fu
Created May 1, 2017 05:37
Show Gist options
  • Select an option

  • Save Le-Fu/e1530f547b06bf1ec24bae8039e8dab2 to your computer and use it in GitHub Desktop.

Select an option

Save Le-Fu/e1530f547b06bf1ec24bae8039e8dab2 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/bapatef
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var then = 0;
function log() {
var now = Date.now();
if ( 1000 / (now - then) > 60 ) {
console.log("this is " + now);
}
then = now;
}
window.onmousemove = log;
</script>
<script id="jsbin-source-javascript" type="text/javascript">var then = 0;
function log() {
var now = Date.now();
if ( 1000 / (now - then) > 60 ) {
console.log("this is " + now);
}
then = now;
}
window.onmousemove = log;</script></body>
</html>
var then = 0;
function log() {
var now = Date.now();
if ( 1000 / (now - then) > 60 ) {
console.log("this is " + now);
}
then = now;
}
window.onmousemove = log;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment