- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Retrieve milliseconds
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 12:28 PM
тАО11-29-2001 12:28 PM
Does anyone know of a % variable that would let them retrieve milliseconds.
Thanks for any/all help.
Points will definitely be assigned.
Thanks, andy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 12:31 PM
тАО11-29-2001 12:31 PM
Re: Retrieve milliseconds
I never knew of a way (in hpux/shell) of getting the current number of ms. However, if you're trying to measure performance, you could use the 'time' command that gives you the elapsed time for a command with millisecond accuracy.
Hope it helps,
Paga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 12:41 PM
тАО11-29-2001 12:41 PM
Re: Retrieve milliseconds
timex sqlplus scott/tiger myquery.sql
You would then need to create a baby sql command script which does everything the above script does EXCEPT the query.
timex sqlplus scott/tiger mydummy.sql. The difference between those should be close.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 12:42 PM
тАО11-29-2001 12:42 PM
Re: Retrieve milliseconds
I believe seconds is the lowest level of precision you can get from the date command. That would make sense because time is kept in the number of seconds since the epoch.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 12:54 PM
тАО11-29-2001 12:54 PM
Re: Retrieve milliseconds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 01:02 PM
тАО11-29-2001 01:02 PM
Re: Retrieve milliseconds
Doesn't Oracle (and Sybase) use the OS time to get the time in the get_time command they use?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 02:05 PM
тАО11-29-2001 02:05 PM
Re: Retrieve milliseconds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2001 04:01 AM
тАО11-30-2001 04:01 AM
Re: Retrieve milliseconds
select DBMS_UTILITY.GET_TIME from dual;
which gives 100ths of seconde that have elapsed since an arbitrary time.
/Jonas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2001 12:11 PM
тАО11-30-2001 12:11 PM
SolutionOracle doen't support milliseconds.
But you can get 100th of a second by using the DBMS_UTILITY.GET_TIME package.
If you need milli seconds conversion, you need to write your own function to manipulate sysdate.
The following PL/SQL block is self explainatory ::
DECLARE
start_date date;
end_date date;
millisec number;
gt1 number;
gt2 number;
BEGIN
gt1:= DBMS_UTILITY.GET_TIME;
dbms_output.put_line('Get_Time Value Before :: '||gt1);
start_date:= sysdate;
dbms_output.put_line('Start Date :: '||to_char(start_date,'DD-MON-YYYY HH24:MI:SS'));
FOR raju IN 1..5000000
LOOP
NULL;
/*
You can use dbms_lock.sleep(n) instead of this dump loop.
*/
END LOOP;
end_date:= sysdate;
dbms_output.put_line('End Date :: '||to_char(end_date,'DD-MON-YYYY HH24:MI:SS'));
millisec:= (end_date-start_date)*24*60*60*1000 ;
gt2:=DBMS_UTILITY.GET_TIME;
dbms_output.put_line('Get_Time Value After :: '||gt2);
dbms_output.put_line('Diff. in time in milli secs ::'||millisec);
dbms_output.put_line('Diff. in Get Time 100th of a sec ::'||to_char(gt2-gt1,'9999999'));
END;
/
Good Luck !
Raju Joseph