Class: RubyProf::Measure::CpuTime
- Inherits:
-
Object
- Object
- RubyProf::Measure::CpuTime
- Defined in:
- ext/ruby_prof/rp_measure_cpu_time.c
Class Method Summary collapse
-
.cpu_frequency ⇒ Integer
Returns the cpu’s frequency.
-
.measure ⇒ Float
Returns the cpu time.
Class Method Details
.cpu_frequency ⇒ Integer
Returns the cpu’s frequency. This value is needed when RubyProf::measure_mode is set to CPU_TIME.
115 116 117 118 119 |
# File 'ext/ruby_prof/rp_measure_cpu_time.c', line 115
static VALUE
prof_get_cpu_frequency(VALUE self)
{
return ULL2NUM(get_cpu_frequency());
}
|
.measure ⇒ Float
Returns the cpu time.
104 105 106 107 108 |
# File 'ext/ruby_prof/rp_measure_cpu_time.c', line 104
static VALUE
prof_measure_cpu_time(VALUE self)
{
return rb_float_new(measure_cpu_time());
}
|