1. using DBMS_UTILITY.GET_TIME
s_date pls_ineteger;
ln_interval pls_integer :=0;
s_date := DBMS_UTILITY.GET_TIME;
--do something
ln_interval := ln_interval + (DBMS_UTILITY.GET_TIME-s_date);
--some other things
--ouput interval
DBMS_OUTPUT.PUT_LINE('time=: ' || ln_interval/100 || ' sec');
2. using systimestamp
s_date timestamp;
temp varchar2(1000);
s_date:=systimestamp;
--do something
temp := systimestamp-s_date;
DBMS_OUTPUT.PUT_LINE('time=: ' || temp);