提交 641d406d 编写于 作者: V Viktor Mihajlovski 提交者: Daniel Veillard

virsh: fixed incorrect timing report

When executing virsh -t <command> the reported timing was off
by 3 orders of magnitude if the command took more than one
second.
Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
上级 eac1ab05
......@@ -1509,7 +1509,7 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd)
return ret;
if (enable_timing) {
double diff_ms = (((after.tv_sec - before.tv_sec) * 1000000.0) +
double diff_ms = (((after.tv_sec - before.tv_sec) * 1000.0) +
((after.tv_usec - before.tv_usec) / 1000.0));
vshPrint(ctl, _("\n(Time: %.3f ms)\n\n"), diff_ms);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册