Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Simple Question on Oracle dbms_utility.get_time

Simple Question on Oracle dbms_utility.get_time

Scheduled Pinned Locked Moved Database
questiondatabaseoracletools
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    devvvy
    wrote on last edited by
    #1

    dbms_utility.get_time It seems like dbms_utility.get_time is not giving me the correct time...? SET TIMING ON; DECLARE i NUMBER :=0; time1 NUMBER; time2 NUMBER; BEGIN time1:=dbms_utility.get_time; LOOP i:=i+1; DBMS_OUTPUT.PUT_LINE(i); EXIT WHEN i>1000; END LOOP; time2:=dbms_utility.get_time; DBMS_OUTPUT.PUT_LINE(time1); DBMS_OUTPUT.PUT_LINE(time2); DBMS_OUTPUT.PUT_LINE('time elapsed in ms: ' || (time2-time1) /100*1000 ); END; The output of the above script: ... ... 997 998 999 1000 1001 862757 862757 time elapsed in ms: 0 PL/SQL procedure successfully completed. Elapsed: 00:00:11.25 *** It seems like get_time is not returning the correct time... What's happenning? *** THANKS in advance! Norman Fung

    D 1 Reply Last reply
    0
    • D devvvy

      dbms_utility.get_time It seems like dbms_utility.get_time is not giving me the correct time...? SET TIMING ON; DECLARE i NUMBER :=0; time1 NUMBER; time2 NUMBER; BEGIN time1:=dbms_utility.get_time; LOOP i:=i+1; DBMS_OUTPUT.PUT_LINE(i); EXIT WHEN i>1000; END LOOP; time2:=dbms_utility.get_time; DBMS_OUTPUT.PUT_LINE(time1); DBMS_OUTPUT.PUT_LINE(time2); DBMS_OUTPUT.PUT_LINE('time elapsed in ms: ' || (time2-time1) /100*1000 ); END; The output of the above script: ... ... 997 998 999 1000 1001 862757 862757 time elapsed in ms: 0 PL/SQL procedure successfully completed. Elapsed: 00:00:11.25 *** It seems like get_time is not returning the correct time... What's happenning? *** THANKS in advance! Norman Fung

      D Offline
      D Offline
      DiWa
      wrote on last edited by
      #2

      dbms_utility.get_time will only give you resolutions of 1/100 second. try to use TIMESTAMP instead. dirk

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups