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
- ObservableCollection.cs
- PeerCredentialElement.cs
- CellConstantDomain.cs
- RecommendedAsConfigurableAttribute.cs
- XamlTypeMapper.cs
- WebErrorHandler.cs
- validationstate.cs
- FunctionGenerator.cs
- TableDetailsRow.cs
- TypeContext.cs
- ColumnResizeUndoUnit.cs
- ComEventsHelper.cs
- _NegotiateClient.cs
- TypeListConverter.cs
- EdmFunction.cs
- PeerNearMe.cs
- ChildDocumentBlock.cs
- HtmlButton.cs
- HostingEnvironmentException.cs
- EncodingInfo.cs
- XpsDigitalSignature.cs
- DataSourceSelectArguments.cs
- ZipArchive.cs
- DiscoveryMessageSequence.cs
- ToolboxItemAttribute.cs
- TargetConverter.cs
- LinqDataSourceDisposeEventArgs.cs
- SqlPersonalizationProvider.cs
- IDReferencePropertyAttribute.cs
- activationcontext.cs
- ListViewHitTestInfo.cs
- ResourceKey.cs
- WebScriptEnablingElement.cs
- VirtualizingStackPanel.cs
- BitmapEffectRenderDataResource.cs
- SafeLocalMemHandle.cs
- DataGridViewRowsRemovedEventArgs.cs
- UInt32.cs
- RayHitTestParameters.cs
- XmlQueryOutput.cs
- ScrollBar.cs
- PeerTransportElement.cs
- HebrewCalendar.cs
- BinaryObjectWriter.cs
- DBSqlParserColumnCollection.cs
- SemaphoreSecurity.cs
- XmlRawWriter.cs
- RootProfilePropertySettingsCollection.cs
- Query.cs
- TreeNodeConverter.cs
- SymbolEqualComparer.cs
- DataRelationCollection.cs
- BasicBrowserDialog.designer.cs
- ConditionalBranch.cs
- FigureHelper.cs
- EpmTargetTree.cs
- RtfToXamlReader.cs
- SpecularMaterial.cs
- StyleBamlTreeBuilder.cs
- CatalogPart.cs
- DrawingImage.cs
- GridViewRowEventArgs.cs
- RoleManagerModule.cs
- ResourcePermissionBase.cs
- DecimalAnimation.cs
- JoinCqlBlock.cs
- SoapEnumAttribute.cs
- AnnotationResource.cs
- GridItemPattern.cs
- FormCollection.cs
- ReadOnlyDataSource.cs
- ListControlConvertEventArgs.cs
- IFlowDocumentViewer.cs
- TabControlCancelEvent.cs
- DataContractSerializerServiceBehavior.cs
- PointCollection.cs
- DragDropHelper.cs
- MarshalByValueComponent.cs
- AudioDeviceOut.cs
- DataKey.cs
- TypeUnloadedException.cs
- URLBuilder.cs
- _FtpControlStream.cs
- DataGridViewBand.cs
- WebServiceReceiveDesigner.cs
- ToolboxItemAttribute.cs
- DataViewManagerListItemTypeDescriptor.cs
- ToolStripStatusLabel.cs
- MemberAccessException.cs
- CornerRadiusConverter.cs
- FontFamilyIdentifier.cs
- UnSafeCharBuffer.cs
- QueryResponse.cs
- LogLogRecord.cs
- FtpWebRequest.cs
- DecoderExceptionFallback.cs
- DaylightTime.cs
- XPathPatternBuilder.cs
- UIElement3DAutomationPeer.cs
- UrlPropertyAttribute.cs