ITPub博客

首页 > Linux操作系统 > Linux操作系统 > dbms_utility.get_time含义

dbms_utility.get_time含义

原创 Linux操作系统 作者:xjc0512 时间:2012-07-18 23:00:13 0 删除 编辑
在运行程序的时候,常常使用dbms_utility.get_time,取2个点的时间,并相减,来获取运行时间。
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.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23700752/viewspace-735966/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-04-11

  • 博文量
    10
  • 访问量
    31989