add autocloseable option

This commit is contained in:
dfsek committed 2021-04-12 00:07:22 -07:00
1 parent b3e3c28276
commit f4716cb28f
1 file changed
+5
@@ -12,4 +12,9 @@ public interface Profiler {
void stop();
Map<String, Timings> getTimings();
default AutoCloseable profile(String frame) {
push(frame);
return () -> pop(frame);
}
}