A script-enabled browser is required for this page to function properly.

ORA_PROF.Elapsed_Time

Description

Returns the amount of time accumulated in the code timer since the last call to Ora_Prof.Reset_Timer.

Syntax


FUNCTION Ora_Prof.Elapsed_Time
   (timer PLS_INTEGER)
RETURN PLS_INTEGER;

Parameters

timer The name of the timer.

Returns

The amount of time (in milliseconds) accumulated in the code timer.

Example


  /*
** Create a timer, start it, run a subprogram,
** stop the timer, then display the time in
** seconds.  Destroy the timer when finished.
*/
PROCEDURE timed_proc (test VARCHAR2) IS
  i PLS_INTEGER;
BEGIN
  Ora_Prof.Create_Timer('loop2');
  Ora_Prof.Start_Timer('loop2');
  test;
  Ora_Prof.Stop_Timer('loop2');
  Text_IO.Putf('Loop executed in %s seconds./n',
     Ora_Prof.Elapsed_Time('loop2'));
  Ora_Prof.Destroy_Timer('loop2');
END;