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 b3f2002..c728f58 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);