ext/stackprof.c in stackprof-0.2.7 vs ext/stackprof.c in stackprof-0.2.8
- old
+ new
@@ -434,11 +434,12 @@
}
static void
stackprof_newobj_handler(VALUE tpval, void *data)
{
- /* TODO: implement interval */
_stackprof.overall_signals++;
+ if (RTEST(_stackprof.interval) && _stackprof.overall_signals % NUM2LONG(_stackprof.interval))
+ return;
stackprof_job_handler(0);
}
static VALUE
stackprof_sample(VALUE self)