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

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

Compare two timeval structures and return a negative value when a < b, 0 when a == b and a positive value otherwise

Definition at line 30 of file timeval.c.

                                                                            {
    assert(a);
    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