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

AvahiUsec avahi_timeval_diff ( const struct timeval *  a,
const struct timeval *  b 
)

Calculate the difference between two timeval structures as microsecond value

Definition at line 49 of file timeval.c.

References AvahiUsec.

                                                                               {
    assert(a);
    assert(b);

    if (avahi_timeval_compare(a, b) < 0)
        return - avahi_timeval_diff(b, a);

    return ((AvahiUsec) a->tv_sec - b->tv_sec)*1000000 + a->tv_usec - b->tv_usec;
}


Generated by  Doxygen 1.6.0   Back to index