public static Task <TimedResult <TNewResult> > ContinueWithTimed <TResult, TNewResult>(this Task <TResult> task, Func <Task <TResult>, TNewResult> supplier) { var timed = TimedResult.Of(() => supplier(task)); return(task.ContinueWith(t => timed())); }
public static Task <TimedResult <T> > StartNewTimed <T>(this TaskFactory factory, Func <T> supplier) { var timed = TimedResult.Of(supplier); return(factory.StartNew(timed)); }