Visual Basic (Declaration) | |
---|---|
Public Class CallsPerSecondCounter |
C# | |
---|---|
public class CallsPerSecondCounter |
Yes you can build this with a Stopwatch.GetTimestamp() instead of DateTime.UtcNow; hoewever the Stopwatch API is 100x slower than using DateTime.UtcNow and although more precise, it generally does not provide significant gains in the sub 50k call range. Generally you can just increase sampleFreq to make up for the lack of precision in DateTime.UtcNow.
System.Object
CSharpTest.Net.Threading.CallsPerSecondCounter
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7