TimeProvider.GetElapsedTime Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
GetElapsedTime(Int64) |
Gets the elapsed time since the |
GetElapsedTime(Int64, Int64) |
Gets the elapsed time between two timestamps retrieved using GetTimestamp(). |
- Source:
- TimeProvider.cs
- Source:
- TimeProvider.cs
Gets the elapsed time since the startingTimestamp
value retrieved using GetTimestamp().
public:
TimeSpan GetElapsedTime(long startingTimestamp);
public TimeSpan GetElapsedTime (long startingTimestamp);
member this.GetElapsedTime : int64 -> TimeSpan
Public Function GetElapsedTime (startingTimestamp As Long) As TimeSpan
Parameters
- startingTimestamp
- Int64
The timestamp marking the beginning of the time period.
Returns
A TimeSpan for the elapsed time between the starting timestamp and the time of this call.
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.NET | 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- TimeProvider.cs
- Source:
- TimeProvider.cs
Gets the elapsed time between two timestamps retrieved using GetTimestamp().
public:
TimeSpan GetElapsedTime(long startingTimestamp, long endingTimestamp);
public TimeSpan GetElapsedTime (long startingTimestamp, long endingTimestamp);
member this.GetElapsedTime : int64 * int64 -> TimeSpan
Public Function GetElapsedTime (startingTimestamp As Long, endingTimestamp As Long) As TimeSpan
Parameters
- startingTimestamp
- Int64
The timestamp marking the beginning of the time period.
- endingTimestamp
- Int64
The timestamp marking the end of the time period.
Returns
A TimeSpan for the elapsed time between the starting and ending timestamps.
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.NET | 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: