Getting access to run time of a process from Ruby, as opposed to wallclock time

T

theosib

The C runtime for POSIX includes a clock() function that gives you the
amount of time that your process has actually had on the CPU. I've
googled for a way to get access to this from Ruby, and all I get is
the fact that rubyprof uses this in its implementation. Is there a
way to get at this or something equivalent from Ruby without having to
write a C extension?

Thanks.
 
J

Joel VanderWerf

The C runtime for POSIX includes a clock() function that gives you the
amount of time that your process has actually had on the CPU. I've
googled for a way to get access to this from Ruby, and all I get is
the fact that rubyprof uses this in its implementation. Is there a
way to get at this or something equivalent from Ruby without having to
write a C extension?

Process.times ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top