timeSync<T> static method
A utility method to time a synchronous function
. Internally calls
function
bracketed by calls to startSync and finishSync.
This is a drop-in replacement for Timeline.timeSync.
Implementation
static T timeSync<T>(String name, TimelineSyncFunction<T> function,
{ Map<String, Object?>? arguments, Flow? flow }) {
startSync(name, arguments: arguments, flow: flow);
try {
return function();
} finally {
finishSync();
}
}