Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Util / counter.cs / 1 / counter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Util { using System; using System.Web; using System.Runtime.InteropServices; ////// internal sealed class Counter { ///Provides access to system timers. ////// not creatable /// private Counter() { } #if UNUSED_CODE internal static float Time(long start) { long time = Value - start; return time / (float)Frequency; } #endif ////// 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Util { using System; using System.Web; using System.Runtime.InteropServices; ////// internal sealed class Counter { ///Provides access to system timers. ////// not creatable /// private Counter() { } #if UNUSED_CODE internal static float Time(long start) { long time = Value - start; return time / (float)Frequency; } #endif ////// 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ContextBase.cs
- WriteTimeStream.cs
- FixedDSBuilder.cs
- DbBuffer.cs
- Viewport2DVisual3D.cs
- DateTimeConstantAttribute.cs
- SourceFilter.cs
- DataGridViewDataErrorEventArgs.cs
- ParserOptions.cs
- HttpInputStream.cs
- ActiveXSite.cs
- DBDataPermission.cs
- SafeEventLogWriteHandle.cs
- NetworkInterface.cs
- TableRow.cs
- ColorMap.cs
- UniqueIdentifierService.cs
- CollectionViewGroupRoot.cs
- VirtualPathProvider.cs
- DataGridViewToolTip.cs
- PersonalizableAttribute.cs
- WebControlAdapter.cs
- PrePostDescendentsWalker.cs
- Triangle.cs
- DataGridViewRowStateChangedEventArgs.cs
- MetadataArtifactLoaderComposite.cs
- StringToken.cs
- ResourceReader.cs
- FrameworkContentElement.cs
- ADConnectionHelper.cs
- InternalCache.cs
- GlyphManager.cs
- QuotedPrintableStream.cs
- PersistenceTypeAttribute.cs
- WindowsGraphics.cs
- WebPageTraceListener.cs
- TraceUtility.cs
- StrongName.cs
- WindowsScrollBar.cs
- WmlListAdapter.cs
- DocumentXPathNavigator.cs
- AttachedAnnotation.cs
- PropertyGridDesigner.cs
- TypedElement.cs
- LassoHelper.cs
- XamlToRtfParser.cs
- Stack.cs
- EllipseGeometry.cs
- PersonalizationProviderHelper.cs
- WsdlBuildProvider.cs
- PrimitiveType.cs
- EncryptedData.cs
- ScriptModule.cs
- compensatingcollection.cs
- ExpressionBindingCollection.cs
- GridViewCommandEventArgs.cs
- SqlDataSourceCache.cs
- TableColumnCollectionInternal.cs
- autovalidator.cs
- TakeOrSkipQueryOperator.cs
- CalendarDateRangeChangingEventArgs.cs
- SoapAttributeAttribute.cs
- EventDescriptor.cs
- ExtenderControl.cs
- ComContractElementCollection.cs
- SingleConverter.cs
- SelectionEditingBehavior.cs
- ObjectPropertyMapping.cs
- Expr.cs
- Process.cs
- BaseCollection.cs
- SByteConverter.cs
- WinCategoryAttribute.cs
- MetadataArtifactLoaderFile.cs
- JsonWriter.cs
- ScrollViewer.cs
- ContractMethodParameterInfo.cs
- DataObjectSettingDataEventArgs.cs
- StrongNamePublicKeyBlob.cs
- MimeMultiPart.cs
- CompositionTarget.cs
- SoapEnumAttribute.cs
- ResolvePPIDRequest.cs
- XmlDataProvider.cs
- LeaseManager.cs
- ValidationPropertyAttribute.cs
- ConnectionManagementSection.cs
- _RequestCacheProtocol.cs
- ConvertTextFrag.cs
- WebPartConnectVerb.cs
- SelfIssuedSamlTokenFactory.cs
- PageBuildProvider.cs
- ResourcePermissionBaseEntry.cs
- RegexRunnerFactory.cs
- ProfileBuildProvider.cs
- BooleanStorage.cs
- PageThemeCodeDomTreeGenerator.cs
- PageThemeBuildProvider.cs
- AssemblyBuilder.cs
- _NetworkingPerfCounters.cs