QueryPerfCounter.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
    public void Start()
    {
        QueryPerformanceCounter(out start);
    }

Usage Example

Example #1
0
        /// <summary>
        /// This implements the interface.
        /// </summary>
        public Customer GetCustomer(int customerID)
        {
            SqlConnection      connection = null;
            CustomerCollection cc         = null;
            QueryPerfCounter   timer      = new QueryPerfCounter();

            timer.Start();
            try
            {
                connection = Connection.GetAcmeConnection();
                cc         = DataAccess.Customer.Customer_SelectByID_Customer_Status_Services(customerID, connection, null);
            }
            catch (Exception ex)
            {
                LogHelper.LogError("Acme.Sys.Exception", ex, false, MethodInfo.GetCurrentMethod(), customerID);
                throw;
            }
            finally
            {
                if (connection != null)
                {
                    connection.Close();
                }
                timer.Stop();
                perfMon.GetCustomer.Process(timer.TotalTicks);
            }
            if (cc.Count > 0)
            {
                return(cc[0]);
            }
            else
            {
                return(null);
            }
        }
All Usage Examples Of QueryPerfCounter::Start