mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-03 06:16:10 +00:00
add autocloseable option
This commit is contained in:
@@ -12,4 +12,9 @@ public interface Profiler {
|
||||
void stop();
|
||||
|
||||
Map<String, Timings> getTimings();
|
||||
|
||||
default AutoCloseable profile(String frame) {
|
||||
push(frame);
|
||||
return () -> pop(frame);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user