<@TIMER>
Syntax
<@TIMER [NAME=name]
[VALUE=value]>
Description
Allows you to create and use named timers.
These timers exist only within the scope of a single application file
execution. <@TIMER> accepts and returns its numbers in
milliseconds.
Upon application file start-up, the default
timer named ELAPSED is created to track elapsed time, and is
set to zero.
You can create new timers or update
existing ones by calling <@TIMER> with an optional
NAME and a required VALUE attribute. If the name
attribute is not specified, the default timer (ELAPSED) is
updated with the value specified.
If a non-numeric value is given, the timer
is set to zero. Values may be negative. When setting a timer, the tag
returns nothing.
The value of a timer is retrieved if only
the NAME attribute and no VALUE attribute is
specified. Retrieving a non-existent timer returns nothing.
Because NAME is optional, the
most simple and direct use of the tag is <@TIMER>,
which returns the elapsed time for the current application file.
Values returned by <@TIMER>
are accurate to 1/60 of a second.
Examples
<@TIMER>
Returns the value of the default timer (ELAPSED).
<@TIMER VALUE="-30000">
Sets the value of the default timer (ELAPSED)
to -30,000 milliseconds.
<@TIMER NAME="Fred"
VALUE="3000">
Creates a new timer named Fred
and sets its value to 3000 milliseconds.
<@TIMER NAME="Fred">
Returns the current value of Fred.
|