From 896cef23c4a9bb1e3e4eeaef8cf101ea4e43af74 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 12 Feb 2010 00:47:35 -0800 Subject: [PATCH] Add process.startTime --- doc/api.txt | 3 +++ src/node.js | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/api.txt b/doc/api.txt index 4cd0d95ce..33d4d6718 100644 --- a/doc/api.txt +++ b/doc/api.txt @@ -112,6 +112,9 @@ The PID of the process. +process.platform+ :: What platform you're running on. +"linux2"+, +"darwin"+, etc. ++process.startTime+ :: +When the process started. + +process.memoryUsage()+ :: Returns the memory usage of the Node process. It looks like this + diff --git a/src/node.js b/src/node.js index 7f16c8201..96825fa81 100644 --- a/src/node.js +++ b/src/node.js @@ -1,4 +1,5 @@ (function (process) { +process.startTime = new Date(); process.global.process = process; process.global.global = process.global;