Logo Search packages:      
Sourcecode: pulseaudio version File versions  Download package

int pa_timeval_cmp ( const struct timeval *  a,
const struct timeval *  b 
)

Compare the two timeval structs and return 0 when equal, negative when a < b, positive otherwse

Definition at line 106 of file timeval.c.

                                                                     {
    pa_assert(a);
    pa_assert(b);

    if (a->tv_sec < b->tv_sec)
        return -1;

    if (a->tv_sec > b->tv_sec)
        return 1;

    if (a->tv_usec < b->tv_usec)
        return -1;

    if (a->tv_usec > b->tv_usec)
        return 1;

    return 0;
}


Generated by  Doxygen 1.6.0   Back to index