Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StorageRoot.cs
- RepeaterItem.cs
- RuleSettings.cs
- BrowserCapabilitiesFactoryBase.cs
- SqlProviderManifest.cs
- DynamicExpression.cs
- EpmCustomContentWriterNodeData.cs
- Empty.cs
- ApplicationServicesHostFactory.cs
- ContentTextAutomationPeer.cs
- ComponentEditorPage.cs
- ItemDragEvent.cs
- HttpModuleCollection.cs
- XmlSchemaAttribute.cs
- WebCategoryAttribute.cs
- CodeExpressionStatement.cs
- EventLog.cs
- AuthenticatingEventArgs.cs
- PrintControllerWithStatusDialog.cs
- JulianCalendar.cs
- SessionStateItemCollection.cs
- ComboBox.cs
- DesignerSerializationVisibilityAttribute.cs
- CommandDevice.cs
- CodeArrayIndexerExpression.cs
- PermissionToken.cs
- FormatException.cs
- XmlParserContext.cs
- XMLSyntaxException.cs
- Part.cs
- MultilineStringConverter.cs
- TimerEventSubscriptionCollection.cs
- CodeDOMUtility.cs
- AspNetHostingPermission.cs
- BitmapSource.cs
- PartialCachingAttribute.cs
- InstanceDataCollection.cs
- TransformedBitmap.cs
- Vector3dCollection.cs
- XpsLiterals.cs
- GB18030Encoding.cs
- VisualTreeUtils.cs
- XamlSerializerUtil.cs
- DataListItem.cs
- XPathArrayIterator.cs
- StatusBar.cs
- TypefaceCollection.cs
- PriorityChain.cs
- WinInetCache.cs
- InternalRelationshipCollection.cs
- altserialization.cs
- ChannelOptions.cs
- ProxyGenerationError.cs
- PropertyChangeTracker.cs
- BufferedGraphicsManager.cs
- SerializationHelper.cs
- ApplicationSecurityInfo.cs
- EmptyWorkItem.cs
- ModelVisual3D.cs
- GridSplitter.cs
- WorkflowQueueInfo.cs
- HtmlElementErrorEventArgs.cs
- VisualCollection.cs
- Task.cs
- BindingCompleteEventArgs.cs
- PresentationAppDomainManager.cs
- SortDescriptionCollection.cs
- XmlEncoding.cs
- HtmlButton.cs
- CollectionType.cs
- VirtualPathUtility.cs
- IOException.cs
- DoubleAnimation.cs
- BuiltInExpr.cs
- TextBoxAutomationPeer.cs
- EndpointDiscoveryBehavior.cs
- RegexCaptureCollection.cs
- RbTree.cs
- PasswordTextContainer.cs
- ObjectQueryState.cs
- XmlObjectSerializer.cs
- WindowShowOrOpenTracker.cs
- PageAsyncTask.cs
- IntPtr.cs
- TextHintingModeValidation.cs
- SymLanguageType.cs
- MemberMaps.cs
- Event.cs
- CommonGetThemePartSize.cs
- ComplexPropertyEntry.cs
- TextParagraphView.cs
- HopperCache.cs
- HttpCookie.cs
- SchemeSettingElementCollection.cs
- CngProvider.cs
- PLINQETWProvider.cs
- DefaultProxySection.cs
- ExpandCollapseProviderWrapper.cs
- SafeEventLogWriteHandle.cs
- MasterPageParser.cs