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.
4 
5 namespace System
6 {
7     internal static class HighPerformanceCounter
8     {
9         public static ulong TickCount => Interop.Sys.GetHighPrecisionCount();
10 
11         // Cache the frequency on the managed side to avoid the cost of P/Invoke on every access to Frequency
12         public static ulong Frequency { get; } = Interop.Sys.GetHighPrecisionCounterFrequency();
13     }
14 }
15