mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-25 21:40:08 +00:00
add autocloseable option
This commit is contained in:
1 parent
eb4bf74cc6
commit
da366a75e8
1 file changed
+5
@@ -12,4 +12,9 @@ public interface Profiler {
|
|||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
Map<String, Timings> getTimings();
|
Map<String, Timings> getTimings();
|
||||||
|
|
||||||
|
default AutoCloseable profile(String frame) {
|
||||||
|
push(frame);
|
||||||
|
return () -> pop(frame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user