Table of Contents

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

action Action

Delegate to invoke and measure.

Returns

TimeSpan

Time elapsed during action invocation.

Call<T>(Func<T>)

Invokes the provided func and measures elapsed time.

public static Measure.CallResult<T> Call<T>(Func<T> func)

Parameters

func Func<T>

Delegate to invoke and measure.

Returns

Measure.CallResult<T>

A Measure.CallResult<T> that contains func invocation result and time elapsed during said invocation.

Type Parameters

T