1 //------------------------------------------------------------------------------
2 // <copyright file="counter.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //------------------------------------------------------------------------------
7 namespace System.Web.Util {
10 using System.Runtime.InteropServices;
14 /// <para>Provides access to system timers.</para>
16 internal sealed class Counter {
26 /// Gets the current system counter value.
28 internal static long Value {
31 SafeNativeMethods.QueryPerformanceCounter(ref count);
38 /// Gets the frequency of the system counter in counts per second.
40 internal static long Frequency {
43 SafeNativeMethods.QueryPerformanceFrequency(ref freq);