Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class method · added in Ruby 3.1

GC.total_time

() -> ::Integer
GC.total_time → int

Returns the measured GC total time in nanoseconds.

Ruby version changes

  1. 3.1
See also .stress= #garbage_collect .stress also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1