Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.
[
define_tag: 'lp_page_timer',
-description='Returns the elapsed time in milliseconds.
_date_msec rolls over to zero once a day (?), so there will be one time per day that *maybe* it will return a large, negative number
usage: [lp_page_timer] returns the elapse time in milliseconds except when first called (default is it returns nothing)
[lp_page_timer: -showfirst] will return zero on the first call instead
calling it multiple times will cause it to return elapse seconds between each call
note: creates a page-only variable called "lp_page_timer" to store the clock_ticks value
',
-priority='replace';
if: var_defined:'__lp_page_timer';
local:'prev' = $__lp_page_timer;
$__lp_page_timer = _date_msec;
return: integer: ($__lp_page_timer - #prev);
else;
var:'__lp_page_timer' = _date_msec;
if: params->size > 0;
return: integer: 0;
/if;
/if;
/define_tag;
]