menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MeasureTime - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MeasureTime

    Provides a diagnostic utility for measuring performance.

    Inheritance
    System.Object
    MeasureTime
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Diagnostics
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class MeasureTime : IDisposable
    Examples

    The following example display a message box with performance info.

    		private void button1_Click(object sender, System.EventArgs e)
    		{
    			int rows = (int) this.numericUpDown1.Value;
    			this.gridControl1.theData = new VirtGrid.VirtData(rows, 20);
    			this.gridControl1.Refresh();
    			using (Syncfusion.Diagnostics.MeasureTime.Measure("gridControl1.TopRowIndex = 500000"))
    			{
    				this.gridControl1.TopRowIndex = 5000000;
    			}
    			MessageBox.Show(Syncfusion.Diagnostics.MeasureTime.DumpTimes());
    		}

    Properties

    TickCount

    Returns the time since Reset in microseconds.

    Declaration
    public long TickCount { get; }
    Property Value
    Type
    System.Int64

    Methods

    Dispose()

    Ends the code block that should be measured and increments the associated performance counter.

    Declaration
    public void Dispose()

    DumpTimes()

    Prints all performance counters into a string and sorts it by ids. All counters will be reset afterwards.

    Declaration
    public static string DumpTimes()
    Returns
    Type
    System.String

    Measure(String)

    Insert this before a code block that should be measured.

    Declaration
    public static MeasureTime Measure(string id)
    Parameters
    Type Name Description
    System.String id
    Returns
    Type
    MeasureTime

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved