Project

General

Profile

Actions

Bug #4581

closed

Documentation for Process.times is outdated

Added by agrimm (Andrew Grimm) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-03-05 trunk 31026) [x86_64-darwin10.6.0]
Backport:
[ruby-core:35785]

Description

=begin
The code sample for Process.times only mentions utime and stime, even though there's cutime and sctime as well. There's also a reference to "page 388", presumably of the first edition of the Pickaxe. Should that be updated or deleted?
=end

Updated by nagachika (Tomoyuki Chikanaga) almost 13 years ago

  • Category set to doc
  • Assignee set to nagachika (Tomoyuki Chikanaga)

Hi,

Thank you for your reporting this.
I wrote a tiny patch. I'll check in this later.
Any corrections are welcome :)


diff --git a/process.c b/process.c
index 24e7bf9..6699484 100644
--- a/process.c
+++ b/process.c
@@ -5611,12 +5611,12 @@ p_gid_switch(VALUE obj)

  • call-seq:
  • Process.times   -> aStructTms
    
    • Returns a Tms structure (see Struct::Tms
    • on page 388) that contains user and system CPU times for this
    • process.
    • Returns a Tms structure (see Struct::Tms)
    • that contains user and system CPU times for this process,
    • and also for children processes.
    • t = Process.times
      
    • [ t.utime, t.stime ]   #=> [0.0, 0.02]
      
    • [ t.utime, t.stime, t.cutime, t.cstime ]   #=> [0.0, 0.02, 0.00, 0.00]
      
    */

VALUE

Actions #2

Updated by nagachika (Tomoyuki Chikanaga) almost 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r31564.
Andrew, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Actions

Also available in: Atom PDF

Like0
Like0Like0