TimeUs
From Pickwiki
Jump to navigationJump to searchThis C program works in HPUX 10.2 and below is VOC item to use with it. Most useful for those who find HPUX only returns time to 1 second detail. This routine passes current time as seconds.microseconds. 
I do:
ECMD = 'TIMEUS'
EXECUTE ECMD,/[[/OUT]].>CAP
STTM = CAP<1>
>CT VOC TIMEUS
     TIMEUS
0001 V
0002 /usr/local/bin/timez
0003 U
0004 TICRGM
>
* =========== timez.c =================
#include <sys/time.h>
main()
{
          struct timeval  first;
           struct timezone tzp;
              gettimeofday (&first, &tzp);
printf("%d.%06d",first.tv_sec,first.tv_usec);
}
