Closed langri-sha closed 8 years ago
in light of https://github.com/defunctzombie/node-process#browser-implementation not adding it might be the best case forward as that allows others to polyfill it if they want
Thank you for pointing to the :memo:, makes perfect sense. If anyone wants to follow the guidelines, here's how I patched mine:
const zulu = Date.now(); // Evaluated when monkeypatch module is first required.
// Seconds since Zulu.
process.uptime = () => Math.ceil((Date.now() - zulu) / 1000);
yeah I put it into my es6 version of this module, because there extra imports are less important.
Missing from the API https://nodejs.org/api/process.html#process_process_uptime. Returns number of seconds since the process has been running.