total_time()
The total time used for garbage collection in seconds
static VALUE gc_profile_total_time(VALUE self) { double time = 0; rb_objspace_t *objspace = &rb_objspace; if (objspace->profile.run && objspace->profile.next_index > 0) { size_t i; size_t count = objspace->profile.next_index; for (i = 0; i < count; i++) { time += objspace->profile.records[i].gc_time; } } return DBL2NUM(time); }