1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 using System
.Diagnostics
;
9 internal static class HighPerformanceCounter
11 public static ulong TickCount
=> Interop
.Sys
.GetTimestamp();
13 // Cache the frequency on the managed side to avoid the cost of P/Invoke on every access to Frequency
14 public static ulong Frequency { get; }
= Interop
.Sys
.GetTimestampResolution();