]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - wme_test/wclient.c
Added test for measuring of CPU scheduler latency.
[frescor/fwp.git] / wme_test / wclient.c
index 686b19c091ee388bd79702c2b29f210722eee25f..7c11c62593632a837c071f8927bf6388aa531c90 100644 (file)
@@ -255,47 +255,6 @@ void save_results(int argc, char *argv[], int useconds)
        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;