mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 10:52:22 +00:00
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: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
parent
eac1ab053c
commit
641d406d27
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user