Created
January 30, 2013 20:47
-
-
Save rickycodes/4676800 to your computer and use it in GitHub Desktop.
b-ot uptime
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 uptime(msg) { | |
var s = process.uptime(); | |
const h = Math.floor( s / ( 60 * 60 ) ); | |
s -= h * ( 60 * 60 ); | |
const m = Math.floor( s / 60 ); | |
s -= m * 60; | |
msg.reply('I have been running for %s hours, %s minutes and %s seconds.', h, m, s); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment