Dela via


IHttpSysRequestTimingFeature.TryGetElapsedTime Method

Definition

Gets the elapsed time between the two given timings.

public bool TryGetElapsedTime (Microsoft.AspNetCore.Server.HttpSys.HttpSysRequestTimingType startingTimestampType, Microsoft.AspNetCore.Server.HttpSys.HttpSysRequestTimingType endingTimestampType, out TimeSpan elapsed);
abstract member TryGetElapsedTime : Microsoft.AspNetCore.Server.HttpSys.HttpSysRequestTimingType * Microsoft.AspNetCore.Server.HttpSys.HttpSysRequestTimingType * TimeSpan -> bool
Public Function TryGetElapsedTime (startingTimestampType As HttpSysRequestTimingType, endingTimestampType As HttpSysRequestTimingType, ByRef elapsed As TimeSpan) As Boolean

Parameters

startingTimestampType
HttpSysRequestTimingType

The timestamp type marking the beginning of the time period.

endingTimestampType
HttpSysRequestTimingType

The timestamp type marking the end of the time period.

elapsed
TimeSpan

A TimeSpan for the elapsed time between the starting and ending timestamps.

Returns

True if both given timings were set (i.e., non-zero).

Applies to