add autocloseable option

This commit is contained in:
dfsek 2021-04-12 00:07:22 -07:00
parent eb4bf74cc6
commit da366a75e8

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);
}
}