home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / vms / 20264 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  4.0 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!news.claremont.edu!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
  2. From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Time functions in VMS comparing and returning the difference
  5. Date: 4 Jan 1993 07:41:36 GMT
  6. Organization: HST Wide Field/Planetary Camera
  7. Lines: 85
  8. Distribution: world
  9. Message-ID: <1i8pngINNdbj@gap.caltech.edu>
  10. References: <921221000127.20407c7f@WSC.COLORADO.EDU>,<1992Dec21.211957.1409@galaxy.gov.bc.ca>
  11. Reply-To: carl@SOL1.GPS.CALTECH.EDU
  12. NNTP-Posting-Host: sol1.gps.caltech.edu
  13.  
  14. In article <1992Dec21.211957.1409@galaxy.gov.bc.ca>, ewilts@galaxy.gov.bc.ca (Ed Wilts) writes:
  15. >In article <921221000127.20407c7f@WSC.COLORADO.EDU>, STU011649835@WSC.COLORADO.EDU : The Macintosh Lab Manager : VIE Systems  writes:
  16. >>     My problem is figuring out how to compare 2 time values and find the
  17. >> difference. I do not have access to the manuals ( if I did I would not know
  18. >> where to start). The online help dosen't provide much help. If you
  19. >> (anyone) have any sample programs, or anything else that might be of help,
  20. >> PLEASE send..... Fortran, Pascal, Basic, C and DCl are all ok, but prefer
  21. >> DCL programs. Thank you all.
  22. >
  23. >Quite a while back I posted the sources TIME to vmsnet.sources.  One of the
  24. >archive sites should have this available.  It will allow you to easily compare
  25. >2 times and return a delta-time.
  26.  
  27. Why go to user-written stuff?  This is another case of someone not reading
  28. the on-line HELP.  In particular:
  29.  
  30. $ HELP RTL LIB LIB$SUB_TIMES
  31.  
  32. RTL_Routines
  33.  
  34.   LIB$
  35.  
  36.     LIB$SUB_TIMES
  37.  
  38.         The Subtract Two Quadword Times routine subtracts two  VMS  internal
  39.         time format times.
  40.  
  41.            Format:
  42.  
  43.              LIB$SUB_TIMES  time1 ,time2 ,resultant-time
  44.  
  45.            Arguments:
  46.  
  47.         time1
  48.  
  49.         VMS usage: date_time
  50.         type: quadword (unsigned)
  51.         access: read only
  52.         mechanism: by reference
  53.  
  54.         First time, from which LIB$SUB_TIMES subtracts the second time.  The
  55.         time1  argument  is  the  address of an unsigned quadword containing
  56.         this number.  Time1 must represent a later time  or  a  longer  time
  57.         interval  than  time2.   Time1  may be either absolute time or delta
  58.         time as long as time2 is of the same type.  If time1 and  time2  are
  59.         of different types, time1 must be the absolute time.
  60.  
  61.         time2
  62.  
  63.         VMS usage: date_time
  64.         type: quadword (unsigned)
  65.         access: read only
  66.         mechanism: by reference
  67.  
  68.         Second time, which LIB$SUB_TIMES subtracts from the first time.  The
  69.         time2  argument  is  the  address of an unsigned quadword containing
  70.         this number.  Time2 must represent an earlier time or a shorter time
  71.         interval  than  time1.   Time2  may be either absolute time or delta
  72.         time as long as time1 is of the same type.  If time2 and  time1  are
  73.         of different types, time2 must be the delta time.
  74.  
  75.         resultant-time
  76.  
  77.         VMS usage: date_time
  78.         type: quadword (unsigned)
  79.         access: write only
  80.         mechanism: by reference
  81.  
  82.         The result of subtracting  time2  from  time1.   The  resultant-time
  83.         argument  is  the  address  of  an  unsigned quadword containing the
  84.         result.   If  both  time1  and   time2   are   delta   times,   then
  85.         resultant-time  is  a  delta  time.   If  both  time1  and time2 are
  86.         absolute times, then resultant-time is a delta time.  If time1 is an
  87.         absolute  time  and time2 is a delta time, then resultant-time is an
  88.         absolute time.
  89.  
  90.  
  91. --------------------------------------------------------------------------------
  92. Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
  93.  
  94. Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
  95. understanding of astronomy is purely at the amateur level (or below).  So
  96. unless what I'm saying is directly related to VAX/VMS, don't hold me or my
  97. organization responsible for it.  If it IS related to VAX/VMS, you can try to
  98. hold me responsible for it, but my organization had nothing to do with it.
  99.