Share this page

# lr_get_transaction_duration

Returns the duration of a transaction.

## C Language

    double lr_get_transaction_duration( char *transaction );

Example: lr_get_transaction_duration | Transaction Functions

## Java

    Double lr.get_transaction_duration( String transaction )

Example: lr.get_transaction_duration | Transaction Functions | Java Syntax

## Arguments

Name | Comments
--- | ---
transaction | A string indicating the name of a transaction.

The lr_get_transaction_duration function returns the duration in seconds of the specified transaction to this point. You use this function to determine the total transaction time before the transaction has ended. lr_get_transaction_duration returns values greater than zero only for open transactions.

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

If this function succeeds, it returns the transaction duration in seconds. If it fails, it returns a negative number. If the transaction already ended or if data is not available for the specified transaction, it returns 0.

## Parameterization

You cannot use standard parameterization for any arguments in 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: