//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
namespace System.Web.Util {
using System;
using System.Web;
using System.Runtime.InteropServices;
///
/// Provides access to system timers.
///
internal sealed class Counter {
///
/// not creatable
///
private Counter() {
}
///
/// Gets the current system counter value.
///
internal static long Value {
get {
long count = 0;
SafeNativeMethods.QueryPerformanceCounter(ref count);
return count;
}
}
///
/// Gets the frequency of the system counter in counts per second.
///
internal static long Frequency {
get {
long freq = 0;
SafeNativeMethods.QueryPerformanceFrequency(ref freq);
return freq;
}
}
}
}