DECLARE start_time number; end_time number; interval number; var number :=0; BEGIN start_time := DBMS_UTILITY.get_time(); for i in 1..1000000 loop var := var+1; -- or do anything end loop; end_time := DBMS_UTILITY.get_time(); interval := (end_time - start_time) * 10; -- make it in milliseconds DBMS_OUTPUT.put_line('This process took ' || interval || ' milliseconds'); END;