aqPerformance.Start Method

Applies to TestComplete 15.68, last modified on October 16, 2024

Description

Use aqPerformance.Start to start or reset a time counter.

Declaration

aqPerformance.Start(CounterName, WarnIfExist)

CounterName [in]    Optional    String Default value: DefaultCounter   
WarnIfExist [in]    Optional    Boolean Default value: True   
Result None

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

CounterName

The name of the counter to start.

WarnIfExist

Specifies whether the method posts a warning message to the test log if the specified time counter is already running.

Result Value

None.

Example

The code below demonstrates how to get the time passed since a time counter started:

JavaScript

function getTime()
{
  // Start a time counter
  aqPerformance.Start();

  // Do some actions

  // Log the elapsed time, in ms
  Log.Message(aqPerformance.Value());
}

JScript

function getTime()
{
  // Start a time counter
  aqPerformance.Start();

  // Do some actions

  // Log the elapsed time, in ms
  Log.Message(aqPerformance.Value);
}

Python

def getTime():
  # Start a time counter
  aqPerformance.Start()

  # Do some actions
  
  # Log the elapsed time, in ms
  Log.Message(aqPerformance.__getprop__("Value"))

VBScript

Sub getTime()
  ' Start a time counter
  aqPerformance.Start()

  ' Do some actions

  ' Log the elapsed time, in ms
  Log.Message(aqPerformance.Value)
End Sub

DelphiScript

function getTime();
begin
  // Start a time counter
  aqPerformance.Start();

  // Do some actions

  // Log the elapsed time, in ms
  Log.Message(aqPerformance.Value);
end;

C++Script, C#Script

function getTime()
{
  // Start a time counter
  aqPerformance["Start"]();

  // Do some actions

  // Log the elapsed time, in ms
  Log["Message"](aqPerformance["Value"]());
}

See Also

aqPerformance Object
Check Method
Value Property
Measuring Test Run Time

Highlight search results