aqPerformance.Value Property

Applies to TestComplete 15.0, last modified on November 17, 2021

Description

Use the Value property to get the elapsed time (in milliseconds) measured by the specified time counter. This is the time passed since the counter was started or reset via aqPerformance.Start.

Declaration

aqPerformance.Value(CounterName)

CounterName [in]    Optional    String Default value: DefaultCounter   
Result Integer

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

CounterName

The counter name that was used in the aqPerformance.Start method. Omit the name to use the default counter.

Result Value

The measured time, in milliseconds.

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
Start Method
Measuring Test Run Time

Highlight search results