Share this page

# lr_get_trans_instance_duration

Returns the duration of a transaction instance.

## C Language

    double lr_get_trans_instance_duration (long trans_handle);

Example: lr_get_trans_instance_duration | Transaction Functions

## Arguments

Name | Comments
--- | ---
trans_handle | A transaction handle.

The lr_get_trans_instance_duration function returns the duration of an open transaction instance in seconds until this point. Use this function to determine the total transaction time before the transaction has ended.

The difference between this function and lr_get_transaction_duration is that with this function you specify a transaction instance by its handle. With lr_get_transaction_duration, you specify an independent transaction by its name.

The trans_handle is the return value of a call to lr_start_transaction_instance.

lr_get_trans_instance_duration returns values greater than zero only for open transactions.

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

## Return Values

If this function succeeds, it returns the transaction duration. 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: