End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method · added in Ruby 3.1
GC.total_time
GC.total_time → int
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/gc.rb, line 298
def self.total_time
Primitive.cexpr! %{
ULL2NUM(rb_objspace.profile.total_time_ns)
}
end
Return measured GC total time in nano seconds.
Ruby version changes
-
3.1
-
GC.total_timereturns measured time in nano-seconds. [[Feature #10917]]
-
See also
.stress=
.verify_compaction_references
.stress
.verify_internal_consistency
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2