-
public final class TracingKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> TtraceSection(String sectionName, Function0<T> block)Runs block inside an Android trace section. -
-
Method Detail
-
traceSection
final static <T extends Any> T traceSection(String sectionName, Function0<T> block)
Runs block inside an Android trace section.
try/finallyis required so Trace.endSection is always called, even when block throws. Without this, begin/end calls can become unbalanced and later work appears in the wrong section.
-
-
-
-