小编Chr*_* S.的帖子

在 Linux .NET Core 3.1+ 上的 C# 中,Stopwatch.GetTimestamp() 是单调的吗?

在 Windows 上,在 C# 中,Stopwatch.GetTimestamp() 是单调的,因为它使用 QueryPerformanceCounter() (请参阅https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.stopwatch?view=网络框架-4.8)。QueryPerformanceCounter 也被 C++ 的 std::steady_clock 的 Microsoft 实现使用,保证是单调的(请参阅https://en.cppreference.com/w/cpp/chrono/steady_clock)。

当使用Linux,.NET Core 3.1时,有谁知道这个方法是否使用保证单调的时钟(假设静态IsHighResolution属性为true)?

c# time .net-core

8
推荐指数
0
解决办法
1210
查看次数

标签 统计

.net-core ×1

c# ×1

time ×1