-
-
Save Raynos/5a7ca9852ac0d8c5f3e1 to your computer and use it in GitHub Desktop.
This file contains 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
function tsov() { | |
var emitter = new EventEmitter() | |
setInterval(function () { | |
emitter.emit("data", Date.now()) | |
}, 1000) | |
return emitter | |
} |
This file contains 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
function vot() { | |
var emitter = new EventEmitter() | |
var value = Date.now() | |
setInterval(function () { | |
value = Date.now() | |
emitter.emit("data", value) | |
}) | |
emitter.valueOf = function () { return value } | |
return emitter | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment