]> git.tue.mpg.de Git - paraslash.git/commitdiff
audiod: use tv2ms to show the time difference
authorAndre <maan@p133.(none)>
Sun, 16 Apr 2006 17:31:51 +0000 (19:31 +0200)
committerAndre <maan@p133.(none)>
Sun, 16 Apr 2006 17:31:51 +0000 (19:31 +0200)
audiod.c

index e1bcbd12c4e8ca365ecb12162905c1ea892173ce..975b3dfee38a86352bf0c224b135424d6151826d 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -797,11 +797,12 @@ static void compute_time_diff(const struct timeval *status_time)
                count > 10? sign : sign * time_smooth, &diff,
                &tmp);
        sa_time_diff = tmp;
-       PARA_INFO_LOG("time diff (cur/avg): "
-               "%li:%lu/%li:%lu\n",
-               sign * diff.tv_sec, (diff.tv_usec + 500) / 1000,
-               sa_time_diff_sign * sa_time_diff.tv_sec,
-               (sa_time_diff.tv_usec + 500)/ 1000);
+       PARA_INFO_LOG("time diff (cur/avg): %s%lums/%s%lums\n",
+               sign > 0? "+" : "-",
+               tv2ms(&diff),
+               sa_time_diff_sign ? "+" : "-",
+               tv2ms(&sa_time_diff)
+       );
 }
 
 static void check_stat_line(char *line)