Project

General

Profile

Bug #4581

Documentation for Process.times is outdated

Added by agrimm (Andrew Grimm) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
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

Associated revisions

Revision 537a2936
Added by nagachika (Tomoyuki Chikanaga) about 8 years ago

  • process.c (rb_proc_times): improve documentation. [ruby-core:35785] fixes #4581, reported by Andrew Grimm.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 31564
Added by nagachika (Tomoyuki Chikanaga) about 8 years ago

  • process.c (rb_proc_times): improve documentation. [ruby-core:35785] fixes #4581, reported by Andrew Grimm.

Revision 31564
Added by nagachika (Tomoyuki Chikanaga) about 8 years ago

  • process.c (rb_proc_times): improve documentation. [ruby-core:35785] fixes #4581, reported by Andrew Grimm.

Revision 31564
Added by nagachika (Tomoyuki Chikanaga) about 8 years ago

  • process.c (rb_proc_times): improve documentation. [ruby-core:35785] fixes #4581, reported by Andrew Grimm.

Revision 31564
Added by nagachika (Tomoyuki Chikanaga) about 8 years ago

  • process.c (rb_proc_times): improve documentation. [ruby-core:35785] fixes #4581, reported by Andrew Grimm.

Revision 31564
Added by nagachika (Tomoyuki Chikanaga) about 8 years ago

  • process.c (rb_proc_times): improve documentation. [ruby-core:35785] fixes #4581, reported by Andrew Grimm.

Revision 31564
Added by nagachika (Tomoyuki Chikanaga) about 8 years ago

  • process.c (rb_proc_times): improve documentation. [ruby-core:35785] fixes #4581, reported by Andrew Grimm.

History

Updated by nagachika (Tomoyuki Chikanaga) about 8 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

#2

Updated by nagachika (Tomoyuki Chikanaga) about 8 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.


  • process.c (rb_proc_times): improve documentation. [ruby-core:35785] fixes #4581, reported by Andrew Grimm.

Also available in: Atom PDF