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
- WindowsFormsSynchronizationContext.cs
- XPathPatternBuilder.cs
- CapacityStreamGeometryContext.cs
- BitmapImage.cs
- CustomTypeDescriptor.cs
- GiveFeedbackEventArgs.cs
- CharAnimationUsingKeyFrames.cs
- TreeNodeStyle.cs
- Missing.cs
- RelationshipConverter.cs
- ReadOnlyDictionary.cs
- ImportedNamespaceContextItem.cs
- UnionExpr.cs
- Color.cs
- FormsAuthenticationUser.cs
- SqlConnectionFactory.cs
- BamlMapTable.cs
- AmbientLight.cs
- TextAutomationPeer.cs
- RouteItem.cs
- ToolStripCodeDomSerializer.cs
- DbSetClause.cs
- EncoderFallback.cs
- BaseTemplatedMobileComponentEditor.cs
- RadioButtonPopupAdapter.cs
- CellPartitioner.cs
- webeventbuffer.cs
- AdditionalEntityFunctions.cs
- GridSplitter.cs
- PersonalizationEntry.cs
- PassportAuthenticationEventArgs.cs
- ZoomPercentageConverter.cs
- log.cs
- RuleProcessor.cs
- HitTestParameters.cs
- DocumentGrid.cs
- HwndStylusInputProvider.cs
- KnownTypeHelper.cs
- TextBox.cs
- EntityContainerRelationshipSet.cs
- _FtpControlStream.cs
- QueryResult.cs
- BroadcastEventHelper.cs
- EntityProviderFactory.cs
- CompositeActivityTypeDescriptorProvider.cs
- ExceptionUtility.cs
- WindowsPrincipal.cs
- DispatcherHooks.cs
- PermissionRequestEvidence.cs
- SelectedDatesCollection.cs
- InkCanvasInnerCanvas.cs
- XmlUTF8TextReader.cs
- NameScopePropertyAttribute.cs
- ConfigurationErrorsException.cs
- DataColumnPropertyDescriptor.cs
- VisualStyleElement.cs
- ComboBoxAutomationPeer.cs
- DataGridBoundColumn.cs
- AuthStoreRoleProvider.cs
- CompressStream.cs
- WebPartEditorCancelVerb.cs
- TextTreeDeleteContentUndoUnit.cs
- BoundPropertyEntry.cs
- WsrmTraceRecord.cs
- CodeConditionStatement.cs
- CodeTypeReferenceCollection.cs
- Table.cs
- RelatedPropertyManager.cs
- CheckBoxFlatAdapter.cs
- BuildResultCache.cs
- XmlSchemaImporter.cs
- MenuItem.cs
- SafeNativeMethods.cs
- ProbeMatchesMessage11.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DynamicDataManager.cs
- DataViewManagerListItemTypeDescriptor.cs
- SmtpFailedRecipientException.cs
- LongPath.cs
- ColorMatrix.cs
- CrossSiteScriptingValidation.cs
- SmtpMail.cs
- WindowsIdentity.cs
- nulltextcontainer.cs
- FreezableDefaultValueFactory.cs
- TCPListener.cs
- DateTimeFormat.cs
- DataAdapter.cs
- DesignerValidationSummaryAdapter.cs
- RijndaelCryptoServiceProvider.cs
- DataServiceResponse.cs
- BitmapEffectCollection.cs
- DetailsViewPageEventArgs.cs
- DataGridViewColumnConverter.cs
- GroupDescription.cs
- ClientTargetCollection.cs
- ExpandableObjectConverter.cs
- GenerateTemporaryTargetAssembly.cs
- UntypedNullExpression.cs
- SqlWebEventProvider.cs