add autocloseable option

This commit is contained in:
dfsek
2021-04-12 00:07:22 -07:00
parent b3e3c28276
commit f4716cb28f

View File

@@ -12,4 +12,9 @@ public interface Profiler {
void stop();
Map<String, Timings> getTimings();
default AutoCloseable profile(String frame) {
push(frame);
return () -> pop(frame);
}
}