Created
February 13, 2017 12:18
-
-
Save gkio/913f8c0d3655a6c9d5d4d54bd3ab7e2f to your computer and use it in GitHub Desktop.
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 ping = require('ping'); | |
var hosts = '104.160.142.3'; | |
setInterval(function(){ | |
ping.promise.probe(hosts) | |
.then(function (res) { | |
console.log(res.time); | |
}); | |
},1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment