ORA_PROF.ELAPSED_TIME
built-in functionThis function returns the amount of time accumulated in the code timer since
the last call to ORA_PROF.RESET_TIMER
.
FUNCTION ORA_PROF.ELAPSED_TIME
(timer PLS_INTEGER)
RETURN PLS_INTEGER;
Parameter |
Description |
|
The name of the timer. |
The amount of time (in milliseconds) accumulated in the code timer.
/*
** 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');
END;
About the ORA_PROF
built-in package
Copyright © 1984, 2005, Oracle. All rights reserved.