Open topic with navigation
This example shows think_time used in an action and also in a sub-routine, YourApiCall, called by that action. get_transaction_think_time is called at the end of the action. The result reflects the total think time both in the main action and in the sub-routine.
Public Function Action() As Long
Dim rc As Integer Dim think_time as Double lr.start_transaction "Flight" lr.think_time 3
' Call the API of your application to see whether the purchase is registered.
rc = YourApiCall (s_code, "EdmundBertam") think_time=lr.get_transaction_think_time("Flight") lr.message "Think time = " + Cstr(think_time)
'Think time = 5.0072
lr.end_transaction "Flight", lr.AUTO
Action = lr.PASS End Function
Function YourApiCall(i As Integer, char As String) As Integer Dim x As Integer
YourApiCall = x