Share this page

# lr.get_transaction_duration

Returns the duration of a transaction.

## C#

    double lr.get_transaction_duration( string transaction );

## VB.NET

    Function lr.get_transaction_duration( ByVal transaction As String ) as Double

Example: lr.get_transaction_duration | Transaction Functions

## Arguments

Name | Comments
--- | ---
transaction | The name of an open transaction.

The lr.get_transaction_duration function returns the duration in seconds of the specified open transaction to this point.

This function returns the duration including Wasted Time. Therefore, the value may be slightly greater than the duration reported for the function when closed with lr.end_transaction.

To determine other transaction statistics, such as think time and wasted time, use the Transaction Functions.

## Return Values

The transaction duration in seconds. If the transaction already ended or if data is not available for the specified transaction, the function returns 0. On function failure, returns a negative number.

## Parameterization

Standard parameterization is not available for this function.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: