timeSync method

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();
  }
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-developer/Timeline/timeSync.html