Timer - Start

Declaration

<AMTIMER SESSION="text" />

Related Topics   

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.

Description

Error Causes

On Error

Example

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description

This sample task illustrates execution of the Timer - Start, Timer - Stop, and Timer - Read activities.

Copy
<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>