From: Joe Van Dyk Date: 2005-12-09T02:44:17+09:00 Subject: Re: Retrieving PID running time On 12/8/05, gwtmp01@mac.com wrote: > > On Dec 8, 2005, at 10:14 AM, Philip Rhoades wrote: > > Yes, but what I want (in Ruby) is something like: > > > > ptime = Process.pid.time > > > > How can I do that? > > This sort of thing is very platform specific. I'm assuming > a unix/linux/macosx environment. I can't answer for Windows. > > For your own process you can use Process::times, which > probably ends up calling getrusage(), a kernel system > call. See the Ruby doc for Process::times, and your system > docs for getrusage. I thought Process::times just returned the system and user cpu time, not the total real time since the application was started.