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
- RectConverter.cs
- DependencyPropertyChangedEventArgs.cs
- RepeaterItemCollection.cs
- ErrorTableItemStyle.cs
- TransformProviderWrapper.cs
- columnmapkeybuilder.cs
- HtmlTitle.cs
- NameValueConfigurationCollection.cs
- TypeForwardedToAttribute.cs
- PagedControl.cs
- Material.cs
- ShellProvider.cs
- EventHandlerList.cs
- NativeMethods.cs
- PassportPrincipal.cs
- PropertyPathWorker.cs
- HandlerElement.cs
- WebReferencesBuildProvider.cs
- Renderer.cs
- SynchronousReceiveBehavior.cs
- KnowledgeBase.cs
- IsolatedStoragePermission.cs
- WebPartHeaderCloseVerb.cs
- LinkButton.cs
- IdentityManager.cs
- XPathSingletonIterator.cs
- InvalidFilterCriteriaException.cs
- oledbconnectionstring.cs
- Operators.cs
- DbConnectionInternal.cs
- ListItemCollection.cs
- ToolStripContainer.cs
- ProfileSettingsCollection.cs
- CaseStatement.cs
- Hyperlink.cs
- SqlError.cs
- PathData.cs
- SrgsElementFactory.cs
- ToolboxItemAttribute.cs
- RectAnimationClockResource.cs
- RedirectionProxy.cs
- ArgIterator.cs
- AuthenticationConfig.cs
- AddInIpcChannel.cs
- CompilerScopeManager.cs
- Lasso.cs
- DelegateTypeInfo.cs
- PenLineJoinValidation.cs
- SingleAnimation.cs
- TemplateControlBuildProvider.cs
- FullTextBreakpoint.cs
- ManagementObjectSearcher.cs
- UIPermission.cs
- SByteStorage.cs
- CommonProperties.cs
- InstanceKeyCollisionException.cs
- WeakReferenceList.cs
- FamilyMapCollection.cs
- JsonDeserializer.cs
- HtmlWindowCollection.cs
- UxThemeWrapper.cs
- ToolBarPanel.cs
- StringKeyFrameCollection.cs
- ScrollViewer.cs
- SubpageParagraph.cs
- SqlRowUpdatingEvent.cs
- Int32Animation.cs
- ResolveNameEventArgs.cs
- FontDifferentiator.cs
- MessageQuerySet.cs
- ContextMenuStripGroup.cs
- OracleNumber.cs
- SoapSchemaImporter.cs
- IFlowDocumentViewer.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ExecutionContext.cs
- BidirectionalDictionary.cs
- RegexCaptureCollection.cs
- TimelineCollection.cs
- DrawingBrush.cs
- DynamicUpdateCommand.cs
- RtfControlWordInfo.cs
- WebProxyScriptElement.cs
- TypeBuilder.cs
- ButtonFieldBase.cs
- StrongNameIdentityPermission.cs
- BamlTreeNode.cs
- DateTimeOffset.cs
- PathSegmentCollection.cs
- MailWebEventProvider.cs
- EdmTypeAttribute.cs
- SqlBooleanMismatchVisitor.cs
- _DigestClient.cs
- CodeVariableReferenceExpression.cs
- FontStyle.cs
- ArgIterator.cs
- DispatchWrapper.cs
- Int32KeyFrameCollection.cs
- BaseParser.cs
- PrinterUnitConvert.cs