In C# on Linux .NET Core 3.1+, is Stopwatch.GetTimestamp() monotonic?

Viewed 580

On Windows, in C#, Stopwatch.GetTimestamp() is monotonic, because it uses QueryPerformanceCounter() (see, e.g. https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.stopwatch?view=netframework-4.8). QueryPerformanceCounter is also used by the Microsoft implementation of C++'s std::steady_clock, guaranteed to be monotonic (see https://en.cppreference.com/w/cpp/chrono/steady_clock).

When using Linux, .NET Core 3.1, does anyone know whether this method uses a clock that is guaranteed to be monotonic (presuming the static IsHighResolution property is true)?

0 Answers
Related