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
- XamlReader.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- WebPartConnectionsEventArgs.cs
- DataServiceException.cs
- SupportingTokenAuthenticatorSpecification.cs
- DateTime.cs
- XmlAttribute.cs
- StreamSecurityUpgradeInitiator.cs
- SchemaTableColumn.cs
- KeyEventArgs.cs
- SqlDependency.cs
- SoapIgnoreAttribute.cs
- SizeKeyFrameCollection.cs
- TextEmbeddedObject.cs
- safex509handles.cs
- TCEAdapterGenerator.cs
- XmlHierarchyData.cs
- RightNameExpirationInfoPair.cs
- RadioButtonStandardAdapter.cs
- FileLevelControlBuilderAttribute.cs
- CompositeFontParser.cs
- TextDecoration.cs
- CodeDirectiveCollection.cs
- SqlFileStream.cs
- SharingService.cs
- SQLByteStorage.cs
- BoolExpressionVisitors.cs
- DataBinder.cs
- ItemsControl.cs
- TimeSpanParse.cs
- ErrorFormatterPage.cs
- TransformConverter.cs
- OleDbDataAdapter.cs
- EmbeddedMailObject.cs
- KernelTypeValidation.cs
- TextBoxAutomationPeer.cs
- CodeGeneratorOptions.cs
- NameHandler.cs
- ImageAutomationPeer.cs
- ParagraphResult.cs
- WebBrowsableAttribute.cs
- GridViewRowCollection.cs
- ToolStripDropDownItemDesigner.cs
- Ref.cs
- TraceLevelStore.cs
- WebConfigurationFileMap.cs
- IndentTextWriter.cs
- DesignerView.Commands.cs
- XsdCachingReader.cs
- TimersDescriptionAttribute.cs
- DescendantOverDescendantQuery.cs
- ReadWriteObjectLock.cs
- DataGridViewRowsAddedEventArgs.cs
- SRef.cs
- SQLMembershipProvider.cs
- PeerHopCountAttribute.cs
- StorageMappingItemCollection.cs
- Visual3DCollection.cs
- SystemEvents.cs
- PkcsMisc.cs
- ConfigPathUtility.cs
- CustomValidator.cs
- ZipFileInfoCollection.cs
- CursorInteropHelper.cs
- NetCodeGroup.cs
- RoutedEventConverter.cs
- LogicalExpressionTypeConverter.cs
- ValidationSummary.cs
- SourceFileInfo.cs
- CustomCategoryAttribute.cs
- ControlIdConverter.cs
- EntityClientCacheEntry.cs
- KnownBoxes.cs
- CompiledRegexRunnerFactory.cs
- While.cs
- TreeNodeMouseHoverEvent.cs
- GenericQueueSurrogate.cs
- MetadataPropertyvalue.cs
- ToolbarAUtomationPeer.cs
- EntityTypeEmitter.cs
- WindowsStartMenu.cs
- MemoryStream.cs
- QilNode.cs
- SecurityCriticalDataForSet.cs
- ResourceAssociationSetEnd.cs
- SmiGettersStream.cs
- CompilerGlobalScopeAttribute.cs
- SecurityException.cs
- TreeView.cs
- VectorAnimationUsingKeyFrames.cs
- Cell.cs
- ModelItemExtensions.cs
- Win32KeyboardDevice.cs
- NetworkInformationException.cs
- SByteConverter.cs
- PenThreadWorker.cs
- FormsAuthenticationConfiguration.cs
- NullableConverter.cs
- PageHandlerFactory.cs
- ProxyElement.cs