Share this page

# lr_get_transaction_think_time

Returns the think time of a transaction.

    double lr_get_transaction_think_time( char *transaction );

Alphabetical Listing - C Language Utility Functions

## Arguments

Name | Comments
--- | ---
transaction | The transaction name.

The lr_get_transaction_think_time function returns the think time of the specified transaction until this point. It 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 think time. 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.

## Example

In the following example, the lr_get_transaction_think_time function gets the think time and sends it to the Output window.

Copy code

    double think_time;
    lr_start_transaction ("Flight");
    web_url("home;sz=234x60;tile=1;ord=977672495775323400",
            "URL=http://ad.doubleclick.net/...ord=977672495775323400",
            ..
            "Mode=URL",
            LAST );
    think_time=lr_get_transaction_think_time("Flight");
    status = web_submit_data("flight",
            "Action=http://www.Web-tours.com/cgi-bin/tours?ITN_RESPONSE+",
            "Method=POST",
            "TargetFrame=",
            ...
            LAST );
     /* End transaction with operation result - pass or fail */
    if (status == 0)
        lr_end_transaction("Flight", LR_PASS);
    else
        lr_end_transaction("Flight", LR_FAIL);
    if (think_time)
        lr_output_message("The transaction think time is %f seconds", think_time);
    else
        lr_output_message("The think time cannot be determined.");

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