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 Stop Timer 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.
General Parameters
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. |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: This sample task illustrates usage of the Start Timer, Stop Timer and Read Timer activities.
<AMVARIABLE NAME="timeVar"></AMVARIABLE> <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" /> <AMMESSAGEBOX>The task execution time to this point is %timeVar% seconds.</AMMESSAGEBOX> <AMSTOPTIMER SESSION="myTime" RESULTVARIABLE="timeVar" /> <AMMESSAGEBOX>The total task execution time is %timeVar% seconds.</AMMESSAGEBOX>