lr.endTimer

Stops a timer.

ExampleInformational Functions

Syntax

lr.endTimer( timer ); 

Arguments

ArgumentComments
timer The handle of the timer returned by lr.startTimer.

lr.endTimer stops a timer that began timing when lr.startTimer was called.

Return Values

The elapsed time in seconds.

Parameterization

You cannot use standard parameterization for any arguments in this function.

Example

function Action(){

   var timer = lr.startTimer();

   /* result is in seconds */
   var time_elapsed = lr.endTimer(timer);

   lr.outputMessage("Duration = " + time_elapsed);

   /* Subtract time spent on call web_reg_save_param from all open transactions.
   Wasted time is measured in milliseconds */

   lr.wastedTime(1000 * time_elapsed);
return 0;
}