Timer - Start
Declaration
<AMTIMER SESSION="text" />
Description
Starts a timer and creates a unique session in which other timer activities can associate with. Sessions allow several timer-based operations to run simultaneously within a single task. Use a Timer - Stop step to end a session and calculate the total elapsed time.
Practical usage
Used as the starting point to record execution time of a single task step, several task steps, or the task in its entirety.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Session | Text | Yes | TimerSession1 | SESSION="myTimer" | The
session name to identify this timer in subsequent timer related
steps. This allows several timer-based operations to be performed
simultaneously within a single task. NOTE: The timer starts upon immediate execution of this step. |
Example
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
This sample task illustrates execution of the Timer - Start, Timer - Stop, and Timer - Read activities.
<AMVARIABLE NAME="timeVar" />
<AMTIMER SESSION="myTime" />
<AMSHOWDIALOG MESSAGE="This step is used primarily to increase the elapsed time. Press Ok to proceed." />
<AMTIMER ACTIVITY="read" RESULTVARIABLE="timeVar" SESSION="myTime" />
<AMSHOWDIALOG>The task execution time to this point is %timeVar% seconds.</AMSHOWDIALOG>
<AMTIMER ACTIVITY="stop" RESULTVARIABLE="timeVar" SESSION="myTime" />
<AMSHOWDIALOG>The total task execution time is %timeVar% seconds.</AMSHOWDIALOG>