upy
is a easy to use machine uptime module for node.js build C++.
Have been tested under Mac and Linux system. Don't have any Windows support.
- install npm
curl http://npmjs.org/install.sh | sh
npm install upy
npm install node-gyp -g
node-gyp configure build
or on older node.js versions
node-waf configure build
npm install -g mocha
mocha test/values.js
Quick example using upy
,
var upy = require('./upy');
console.log( upy.uptime() ); // Uptime x day(s), x hour(s), x minute(s), x second(s)
upy.uptime() // returns a string telling you the uptime
upy.days() // returns uptime in days
upy.hours() // returns uptime in hours
upy.minutes() // returns uptime in minute
upy.seconds() // returns uptime in seconds
upy.timestamp() // returns uptime as a timestamp (seconds)
upy
is release under MIT license.
Copyright 2011 Fredrik Forsmo