VirtualUserScript GetTransactionElapsedTime Method C# API
Gets the current elapsed time of the transaction with the specified id and tag.

Namespace: Facilita.Fc.Runtime
Assembly: fc_clr (in fc_clr.dll) Version:

public int GetTransactionElapsedTime(
	string id,
	string tag = ""


Type: System String
The transaction identifier.
tag (Optional)
Type: System String
The transaction tag.

Return Value

The elapsed time of the transaction, in milliseconds.

The following example demonstrates setting a progress point to indicate that a transaction has lasted more than 5 seconds.
StartTransaction("Transaction1", "Tag1");

// do activity

StartTransaction("Transaction1", "Tag2");
if (GetTransactionElapsedTime("Transaction1", "Tag1") > 5000)
    SetProgressPoint("Activity > 5 Seconds");

EndTransaction("Transaction1", true, "Tag1");

// do more activity

EndTransaction("Transaction1", true, "Tag2");
See Also