Created
May 1, 2017 05:37
-
-
Save Le-Fu/e1530f547b06bf1ec24bae8039e8dab2 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/bapatef
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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