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)