profile<T> method
- T f(
- {ZoneSpecification zoneSpec}
Profile the provided function. Accepts optional ZoneSpecification or use the defaultZoneSpec
Implementation
T profile<T>(T Function() f, {ZoneSpecification zoneSpec}) {
if(_profiling){
throw StateError('Already Profiling');
}
_profiling = true;
_st.start();
return runZoned<T>(f, zoneSpecification: (zoneSpec ?? defaultZoneSpec));
}