1847895 Members
2573 Online
104021 Solutions
New Discussion

Getting time

 
System Dude_1
Frequent Advisor

Getting time

Could anyone please advice on how to get the current current date/month/year hour/minute/second/millisecond in HP-UX
Performance Issue on HP-UX 10.20
5 REPLIES 5
U.SivaKumar_2
Honored Contributor

Re: Getting time

Hi,

#man date

regards,
U.SivaKumar
Innovations are made when conventions are broken
System Dude_1
Frequent Advisor

Re: Getting time

know that but please read my question properly that I need to get up to milisecond as well
Performance Issue on HP-UX 10.20
John Palmer
Honored Contributor

Re: Getting time

man gettimeofday

You'll either have to write a simple C program or maybe use perl.

Regards,
John
Robin Wakefield
Honored Contributor

Re: Getting time

Hi,

Have a look at:

http://search.cpan.org/author/JHI/perl-5.8.0/ext/Time/HiRes/HiRes.pm

this will return Epoch seconds/milliseconds.

Rgds, Robin
Tom Jackson
Valued Contributor

Re: Getting time

Dude:

man gettimeofday

It says it returns time expressed in seconds and microseconds since midnight January 1, 1970.

Looks like you need a 'C' call. Dat only returns the date in seconds.

Tom