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

Discussion in 'Ruby' started by theosib@gmail.com, Mar 6, 2008.

  1. Guest

    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.
    , Mar 6, 2008
    #1
    1. Advertising

  2. Re: Getting access to run time of a process from Ruby, as opposed to wall clock time

    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
    Joel VanderWerf, Mar 6, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. anon
    Replies:
    5
    Views:
    324
    Keith W. McCammon
    May 19, 2004
  2. Chris Berg
    Replies:
    1
    Views:
    507
    Sudsy
    Nov 23, 2003
  3. Ed
    Replies:
    5
    Views:
    506
    Davis
    Oct 30, 2004
  4. kevs
    Replies:
    3
    Views:
    1,818
  5. Alf P. Steinbach
    Replies:
    3
    Views:
    180
    Alf P. Steinbach
    Oct 17, 2013
Loading...

Share This Page