exit(0);
}
-static inline
-void timespec_add (struct timespec *sum, const struct timespec *left,
- const struct timespec *right)
-{
- sum->tv_sec = left->tv_sec + right->tv_sec;
- sum->tv_nsec = left->tv_nsec + right->tv_nsec;
-
- if (sum->tv_nsec >= 1000000000){
- ++sum->tv_sec;
- sum->tv_nsec -= 1000000000;
- }
-}
-
-static inline
-void timespec_sub (struct timespec *diff, const struct timespec *left,
- const struct timespec *right)
-{
- diff->tv_sec = left->tv_sec - right->tv_sec;
- diff->tv_nsec = left->tv_nsec - right->tv_nsec;
-
- if (diff->tv_nsec < 0){
- --diff->tv_sec;
- diff->tv_nsec += 1000000000;
- }
-}
-
-static inline long long timespec_sub_usec(const struct timespec *left,
- const struct timespec *right)
-{
- struct timespec result;
- timespec_sub(&result, left, right);
- return (long long)result.tv_sec * SEC_TO_USEC +
- result.tv_nsec / USEC_TO_NSEC;
-}
-
-static inline long long timespec2usec(const struct timespec *ts)
-{
- return ts->tv_sec * SEC_TO_USEC + ts->tv_nsec / USEC_TO_NSEC;
-}
-
-
int create_ac_socket(unsigned int ac)
{
int sockfd;