HELPLIB.HLB  —  CRTL  ftime
    Returns the elapsed time since 00:00:00, January 1, 1970, in the
    structure pointed at by timeptr.

    Format

      #include  <timeb.h>

      int ftime  (struct timeb *timeptr);

1  –  Function Variants

    Compiling with the _DECC_V4_SOURCE and _VMS_V6_SOURCE feature-
    test macros defined enables a local-time-based entry point to the
    ftime function that is equivalent to the behavior before OpenVMS
    Version 7.0.

2  –  Argument

 timeptr

    A pointer to the structure timeb_t.

3  –  Description

    The typedef timeb_t refers to the following structure defined in
    the <timeb.h> header file:

    typedef struct timeb
       {
          time_t         time;
          unsigned short millitm;
          short          timezone;
          short          dstflag;
       };

    The member time gives the time in seconds.

    The member millitm gives the fractional time in milliseconds.

    After a call to ftime, the timezone and dstflag members of the
    timeb structure have the values of the global variables timezone
    and dstflag, respectively. See the description of the tzset
    function for timezone and dstflag global variables.

4  –  Return Values

    0                  Successful execution. The timeb_t structure is
                       filled in.
    -1                 Indicates an error. Failure might indicate
                       that the system's time-differential factor
                       (that is, the difference between the system
                       time and UTC time) is not set correctly.

                       If the value of the SYS$TIMEZONE_DIFFERENTIAL
                       logical is wrong, the function fails with
                       errno set to EINVAL.
Close Help