VMS Help  —  CRTL  clock_getres
    Gets the resolution for the specified clock.

    This function is supported on OpenVMS Integrity servers and
    Alpha only.

    Format

      #include  <time.h>

      int clock_getres  (clockid_t clock_id, struct timespec *res);

1  –  Arguments

 clock_id

    The clock type used to obtain the resolution. The CLOCK_REALTIME
    clock is supported and represents the TIME-OF-DAY clock for the
    system.

 res

    A pointer to the timespec data structure that receives the value
    of the clock's resolution.

2  –  Description

    The clock_getres function obtains the resolution value for the
    specified clock. Clock resolutions are implementation-dependent
    and cannot be set by a process.

    If the res argument is not NULL, the resolution of the specified
    clock is stored in the location pointed to by res.

    If res is NULL, the clock resolution is not stored.

    If the time argument (tp) of clock_settime is not a multiple of
    res, then the value is truncated to a multiple of res.

    On success, the function returns 0.

    On failure, the function returns -1 and sets errno to indicate
    the error.

    See also clock_gettime, clock_settime, time, and ctime.

3  –  Return Values

    0                  Indicates success.
    -1                 Indicates failure; errno is set to the
                       following value:

                       o  EINVAL - The clock_id argument does not
                          specify a known clock.
Close Help