timed<T> static method
Implementation
static Future<TimedResult<T?>> timed<T>(FutureOr<T> exec,
{String? debugName}) async {
final start = DateTime.now();
final value = await exec;
try {
return TimedResult<T>(value, ResultType.success, null, start.sinceNow(),
debugName: debugName);
} catch (e) {
return TimedResult<T?>(null, ResultType.error, "$e", start.sinceNow(),
debugName: debugName);
}
}