Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Getting access to run time of a process from Ruby, as opposed to wallclock time

Reply
Thread Tools

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

 
 
theosib@gmail.com
Guest
Posts: n/a
 
      03-06-2008
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.

 
Reply With Quote
 
 
 
 
Joel VanderWerf
Guest
Posts: n/a
 
      03-06-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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 ?

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get wallclock time between any two events (not simulation time) in vhdl kevs VHDL 3 05-17-2008 05:16 PM
LAMP & J2EE as opposed to LAMP vs J2EE Ross M. Greenberg Java 6 12-24-2004 09:59 PM
Help please - Why does ByteBuffer return '?' as opposed to what was put? Ed Java 5 10-30-2004 12:05 AM
SSL Performance HIT in REVERSE? the clients are PEGGED as opposed to the server? anon ASP .Net 5 05-19-2004 01:25 PM
java.nio as opposed to java.net - basic difference in program logic? Chris Berg Java 1 11-23-2003 11:09 PM



Advertisments