Sha256: b46cd6c372566bb9b7add9864b7ab979f38b3107acfbe30907927a4c0439a22b

Contents?: true

Size: 1.87 KB

Versions: 16

Compression:

Stored size: 1.87 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:
times:@docstringIC:YARD::Docstring"ÉReturns a <code>Tms</code> structure (see <code>Struct::Tms</code>
on page 388) that contains user and system CPU times for this
process.

   t = Process.times
   [ t.utime, t.stime ]   #=> [0.0, 0.02]
:@objectu:YARD::StubProxyProcess.times:
@summary0:	@all"ÛReturns a <code>Tms</code> structure (see <code>Struct::Tms</code>
on page 388) that contains user and system CPU times for this
process.

   t = Process.times
   [ t.utime, t.stime ]   #=> [0.0, 0.02]


@overload times:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Process.times;;;IC;	"
;
u;Process.times;0;
";[;[:@types0:@parameters[:
@text0:@signature"
times:@tag_name"
overload:@current_file_has_commentsF:@scope:
class;[:@docstring_extra0:@files[["process.c0:@namespaceu;Process:
@path"Process.times;[:@visibility:public:@source"Ë/*
 *  call-seq:
 *     Process.times   => aStructTms
 *
 *  Returns a <code>Tms</code> structure (see <code>Struct::Tms</code>
 *  on page 388) that contains user and system CPU times for this
 *  process.
 *
 *     t = Process.times
 *     [ t.utime, t.stime ]   #=> [0.0, 0.02]
 */

VALUE
rb_proc_times(obj)
    VALUE obj;
{
#if defined(HAVE_TIMES) && !defined(__CHECKER__)
    const double hertz =
#ifdef HAVE__SC_CLK_TCK
    (double)sysconf(_SC_CLK_TCK);
#else
#ifndef HZ
# ifdef CLK_TCK
#   define HZ CLK_TCK
# else
#   define HZ 60
# endif
#endif /* HZ */
    HZ;
#endif
    struct tms buf;
    volatile VALUE utime, stime, cutime, sctime;

    times(&buf);
    return rb_struct_new(S_Tms,
             utime = rb_float_new(buf.tms_utime / hertz),
             stime = rb_float_new(buf.tms_stime / hertz),
             cutime = rb_float_new(buf.tms_cutime / hertz),
             sctime = rb_float_new(buf.tms_cstime / hertz));
#else
    rb_notimplement();
#endif
}:@source_type:c

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
pry-doc-0.5.1 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.5.0 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.4.6 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.4.5 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Process/times_c.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Process/times_c.dat