× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Try this and see if it does what you want:

     H BndDir('QC2LE')
     H Copyright('V1.0')

     D GetTimeOfDay    PR                  ExtProc('gettimeofday')
     D   TimeVal                      8a
     D   TimeZone                     8a

     D GetTimeZone     PR             5a

     D TimeVal         DS
     D   tv_secs                     10i 0
     D   tv_usecs                    10i 0

     D TimeZone        DS
     D   tz_Dir                       1a
     D   tz_Hour                      2s 0
     D   tz_Frac                      2s 0

     D Junk            S              8a
     D Epoch           S               z
Inz(z'1970-01-01-00.00.00.000000')
     D Current         S               z

      * get current time
     C                   Callp     gettimeofday(timeval: junk)
      * convert to a timestamp
     C     Epoch         AddDur    tv_secs:*S    Current
     C                   AddDur    tv_usecs:*MS  Current
      * adjust for timezone
     C                   Eval      timezone = GetTimeZone
     C                   If        tz_Dir = '-'
     C                   SubDur    tz_Hour:*H    Current
     C                   Else
     C                   AddDur    tz_Hour:*H    Current
     C                   EndIF
      * show it.
     C                   Dsply                   Current
     C                   Eval      *inLR = *On


****************************************************************************
******************
      * This gets the offset from Universal Coordinated Time (UTC) from the
system value QUTCOFFSET

****************************************************************************
******************
     P GetTimeZone     B
     D GetTimeZone     PI             5a

     D peRcvVar        S              1a   Dim(100)
     D peRVarLen       S             10i 0
     D peNumVals       S             10i 0
     D peSysValNm      S             10a
     D p_Offset        S               *
     D wkOffset        S             10i 0 Based(p_Offset)
     D p_SV            S               *

     D dsSV            DS                  Based(p_SV)
     D  ds_SVSysVal                  10a
     D  ds_SVDtaTyp                   1a
     D  ds_SVDtaSts                   1a
     D  ds_SVDtaLen                  10i 0
     D  ds_SVData                     5a

     D dsErrCode       DS
     D  ds_BytesPrv            1      4b 0 Inz(256)
     D  ds_BytesAvl            5      8b 0 Inz(0)
     D  ds_ExcpID              9     15
     D  ds_Reserved           16     16
     D  ds_ExcpData           17    256
     C                   Call      'QWCRSVAL'                           99
     C                   Parm                    peRcvVar
     C                   Parm      100           peRVarLen
     C                   Parm      1             peNumVals
     C                   Parm      'QUTCOFFSET'  peSysValNm
     C                   Parm                    dsErrCode
     C                   If        ds_BytesAvl > 0  or  *in99 = *On
     C                   Return    *Blanks
     C                   EndIF
     C                   Eval      p_Offset = %addr(peRcvVar(5))
     C                   Eval      p_SV = %addr(peRcvVar(wkOffset+1))
     C                   Return    ds_SVData
     PGetTimeZone      E

-----Original Message-----
From: Rick Rayburn [mailto:the400man@hotmail.com]
Sent: Wednesday, February 13, 2002 1:51 PM
To: midrange-l@midrange.com
Subject: Can we retrieve MILLISECONDS?


Got a request to capture the time of a transaction in hours, minutes,
seconds...and, believe it or not...milli-seconds!

Please don't ask me why...mine is not to ask...etc....

Anyway to enhance the captured time within an RPG program, API or whatever,
with...milli-seconds?

I know, I know...

Thanks for any assistance in this matter!


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.