eg:
declare i number;
j number;
begin
i:=dbms_utility.get_time;
dbms_lock.sleep(1.51);
j:=dbms_utility.get_time;
dbms_output.put_line(j-i);
end;
那么dbms_utility.get_time究竟表示什么含义呢?查了下官方文档,同时google了下,单个该函数没有什么具体含义,主要是2个值相减取差值。
官方文档参考:
GET_TIME Function
This function determines the current time in 100th's of a second. This subprogram is primarily used for determining elapsed time. The subprogram is called twice – at the beginning and end of some process – and then the first (earlier) number is subtracted from the second (later) number to determine the time elapsed.
Syntax
DBMS_UTILITY.GET_TIME
RETURN NUMBER;
Return Values
Time is the number of 100th's of a second from the point in time at which the subprogram is invoked.
Usage Notes
Numbers are returned in the range -2147483648 to 2147483647 depending on platform. and machine, and your application must take the sign of the number into account in determining the interval. For instance, in the case of two negative numbers, application logic must allow that the first (earlier) number will be larger than the second (later) number which is closer to zero. By the same token, your application should also allow that the first (earlier) number be negative and the second (later) number be positive.