Workbench User Guide : Generating Fields from Predefined Templates : How You Can Add a Generated Field to a Frame : The elapsed_timer Field Template
 
Share this page          
The elapsed_timer Field Template
The elapsed_timer field template provides an elapsed timer that displays elapsed time in digital (hh:mm) format.
Create an Elapsed Timer Field
You can create an elapsed timer field using the elapsed_timer field template in the Frame Editor.
To create an elapsed timer field
1. On the Develop tab, in the Components portlet, open the frame in which you want to create the field from the field template.
2. Click Insert, Field From Field Template.
The Select a Field Template dialog appears.
3. Select the core application and the elapsed_timer template, and then click OK.
4. Position the field on the frame.
The Elapsed Timer Assistant appears.
5. Complete the dialog using the following information:
Timer Update Interval (in seconds)
Specifies the amount of time between updates of the elapsed timer
Display Seconds
Specifies that seconds are displayed in the elapsed timer
6. Click Generate.
The field is created and displayed on the form.
How an Elapsed Timer Field Works
When the frame containing the elapsed timer field is executed, the field appears as follows—displaying hours, minutes, and seconds (if specified) elapsed:
Timekeeping starts when the timer's frame is executed and continues until the running frame is closed. The timer operates automatically and updates its display at a specified frequency.
The timekeeping, display, and alarm functions of the elapsed_timer field are handled by the Timer_Manager user class, with a number of private user classes. For more information about the Timer_Manager class, see the appendix "Generated User Classes" in the Language Reference Guide.