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

ORA_PROF.BAD_TIMER built-in exception

This exception is raised when an invalid timer name is supplied to another ORA_PROF package procedure or function.

Syntax


ORA_PROF.BAD_TIMER EXCEPTION;

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.PUT('Loop executed in %s seconds.\n',
  ORA_PROF.ELAPSED_TIME('loop2'));
  ORA_PROF.DESTROY_TIMER('loop2');

 EXCEPTION
  WHEN ORA_PROF.BAD_TIMER THEN
   TEXT_IO.PUT_LINE('Invalid timer name');

END;

See also

About the ORA_PROF built-in package

ORA_PROF built-in package