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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ModelVisual3D.cs
- SymbolType.cs
- HScrollProperties.cs
- RoutedEventArgs.cs
- Bitmap.cs
- KeyValueConfigurationCollection.cs
- Dynamic.cs
- MimeXmlReflector.cs
- ConnectionProviderAttribute.cs
- DBAsyncResult.cs
- TextServicesCompartment.cs
- PiiTraceSource.cs
- WebColorConverter.cs
- RelationshipEndMember.cs
- isolationinterop.cs
- TabPanel.cs
- WebPartChrome.cs
- Matrix.cs
- DocumentViewerBase.cs
- PageBreakRecord.cs
- Decoder.cs
- SpeechEvent.cs
- ConfigXmlComment.cs
- ToolStripPanelSelectionBehavior.cs
- PocoPropertyAccessorStrategy.cs
- UnaryNode.cs
- CheckBoxBaseAdapter.cs
- ServiceModelActivationSectionGroup.cs
- ReadingWritingEntityEventArgs.cs
- CodeVariableReferenceExpression.cs
- NotImplementedException.cs
- RelationshipDetailsCollection.cs
- TextRangeEditLists.cs
- BaseTypeViewSchema.cs
- CellTreeNodeVisitors.cs
- SqlCommandSet.cs
- Pair.cs
- GlobalDataBindingHandler.cs
- ScrollProviderWrapper.cs
- CurrencyManager.cs
- ToolStripGripRenderEventArgs.cs
- WebPartZoneCollection.cs
- Scene3D.cs
- MetadataProperty.cs
- WebConfigurationHost.cs
- Error.cs
- BindStream.cs
- RenderDataDrawingContext.cs
- ConstNode.cs
- ReceiveContext.cs
- ParseHttpDate.cs
- StreamSecurityUpgradeInitiator.cs
- RoutedCommand.cs
- CmsUtils.cs
- SspiSecurityToken.cs
- ProcessModuleCollection.cs
- ShutDownListener.cs
- PageEventArgs.cs
- SafeNativeMethods.cs
- ContentValidator.cs
- DbProviderFactory.cs
- TextServicesPropertyRanges.cs
- LinearGradientBrush.cs
- SqlDataRecord.cs
- MobileSysDescriptionAttribute.cs
- ReferenceConverter.cs
- DefaultSettingsSection.cs
- localization.cs
- UriSection.cs
- ExpressionVisitorHelpers.cs
- OrderablePartitioner.cs
- MasterPage.cs
- CodeBlockBuilder.cs
- GraphicsPath.cs
- UnicodeEncoding.cs
- WsatConfiguration.cs
- FilteredSchemaElementLookUpTable.cs
- PenLineCapValidation.cs
- HttpEncoderUtility.cs
- GridViewUpdateEventArgs.cs
- InputLangChangeRequestEvent.cs
- SettingsSavedEventArgs.cs
- BamlWriter.cs
- NodeLabelEditEvent.cs
- TimerEventSubscriptionCollection.cs
- DataConnectionHelper.cs
- DesignTimeData.cs
- Roles.cs
- ClientUrlResolverWrapper.cs
- BitHelper.cs
- httpstaticobjectscollection.cs
- COM2ExtendedTypeConverter.cs
- IntSecurity.cs
- SystemException.cs
- StringFormat.cs
- XmlBinaryWriterSession.cs
- UriExt.cs
- ServiceDesigner.xaml.cs
- BuildProviderCollection.cs
- TabControl.cs