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

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.

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>