diff options
Diffstat (limited to 'glusterfsd/src')
-rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 793f27ab67f..eaf6796e4c3 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -629,7 +629,7 @@ glusterfs_volume_top_perf(const char *brick_path, dict_t *dict, goto out; } - time = (end.tv_sec - begin.tv_sec) * 1e6 + (end.tv_usec - begin.tv_usec); + time = gf_tvdiff(&begin, &end); throughput = total_blks / time; gf_log("glusterd", GF_LOG_INFO, "Throughput %.2f Mbps time %.2f secs " @@ -685,7 +685,7 @@ glusterfs_volume_top_perf(const char *brick_path, dict_t *dict, goto out; } - time = (end.tv_sec - begin.tv_sec) * 1e6 + (end.tv_usec - begin.tv_usec); + time = gf_tvdiff(&begin, &end); throughput = total_blks / time; gf_log("glusterd", GF_LOG_INFO, "Throughput %.2f Mbps time %.2f secs " |