Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: get_cpu_time vs. get_time

Re: get_cpu_time vs. get_time

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 12 Jan 2007 08:52:18 -0800
Message-ID: <1168620738.571203@bubbleator.drizzle.com>


cpiodumpv_at_gmail.com wrote:
> can someone explain this?
>

>> list

> 1 declare
> 2 l_temp number;
> 3 begin
> 4 l_temp := DBMS_UTILITY.get_cpu_time;
> 5 dbms_output.put_line ( 'before=' || l_temp );
> 6 dbms_lock.sleep ( 5 );
> 7 l_temp := DBMS_UTILITY.get_cpu_time;
> 8 dbms_output.put_line ( 'after=' || l_temp );
> 9* end;
>> /

> before=5
> after=5
>
>> list

> 1 declare
> 2 l_temp number;
> 3 begin
> 4 l_temp := DBMS_UTILITY.get_time;
> 5 dbms_output.put_line ( 'before=' || l_temp );
> 6 dbms_lock.sleep ( 5 );
> 7 l_temp := DBMS_UTILITY.get_time;
> 8 dbms_output.put_line ( 'after=' || l_temp );
> 9* end;
>> /

> before=76096444
> after=76096945
>
> PL/SQL procedure successfully completed.

Certainly ... get_cpu_time does not do what you think it does.

GET_CPU_TIME: Returns the current CPU time in 100th's of a second GET_TIME: Returns the current time in 100th's of a second

Read The Fine Manuals at http://tahiti.oracle.com. ;-)

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Jan 12 2007 - 10:52:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US