]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Fix wrong type of timestamps in histogram
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 3 Dec 2010 16:58:43 +0000 (17:58 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 3 Dec 2010 16:58:43 +0000 (17:58 +0100)
We have incorrectly logged userspace timestamps instead of kernel ones.

latester/latester.c

index b3f20029becb8c67e55f9bf95183c7cd9491e8b7..c728f5804a5c1fc51a58d8214d02e52119a8196e 100644 (file)
@@ -232,9 +232,9 @@ static inline unsigned get_msg_latency_us(struct msg_info *mi)
        struct timespec diff;
        if (num_interfaces == 3)
                if (opt.userhist)
-                       timespec_subtract(&diff, &mi->ts_rx_final_kern, &mi->ts_rx_onwire_kern);
-               else
                        timespec_subtract(&diff, &mi->ts_rx_final, &mi->ts_rx_onwire);
+               else
+                       timespec_subtract(&diff, &mi->ts_rx_final_kern, &mi->ts_rx_onwire_kern);
        else
                if (opt.userhist)
                        timespec_subtract(&diff, &mi->ts_rx_final, &mi->ts_sent);