Skip to content

Instantly share code, notes, and snippets.

@rickycodes
Created January 30, 2013 20:47
Show Gist options
  • Save rickycodes/4676800 to your computer and use it in GitHub Desktop.
Save rickycodes/4676800 to your computer and use it in GitHub Desktop.
b-ot uptime
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