dynamic timeSync(String name, TimelineSyncFunction function, { Map arguments })

A utility method to time a synchronous function. Internally calls function bracketed by calls to startSync and finishSync.

Source

static dynamic timeSync(String name, TimelineSyncFunction function,
    {Map arguments}) {
  startSync(name, arguments: arguments);
  try {
    return function();
  } finally {
    finishSync();
  }
}