Class Measure
- Namespace
- LfrlAnvil.Diagnostics
- Assembly
- LfrlAnvil.Core.dll
Allows to measure time elapsed during delegate invocations.
public static class Measure
- Inheritance
-
Measure
- Inherited Members
Methods
Call(Action)
Invokes the provided action and measures elapsed time.
public static TimeSpan Call(Action action)
Parameters
actionActionDelegate to invoke and measure.
Returns
- TimeSpan
Time elapsed during
actioninvocation.
Call<T>(Func<T>)
Invokes the provided func and measures elapsed time.
public static Measure.CallResult<T> Call<T>(Func<T> func)
Parameters
funcFunc<T>Delegate to invoke and measure.
Returns
- Measure.CallResult<T>
A Measure.CallResult<T> that contains
funcinvocation result and time elapsed during said invocation.
Type Parameters
T