[Pkg-libvirt-commits] [libguestfs] 21/31: mllib: use Unix.gettimeofday instead of Unix.time
Hilko Bengen
bengen at moszumanska.debian.org
Sun Nov 1 17:13:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.29.46
in repository libguestfs.
commit fa80f88c9cfe83c1c46c36fbda00c568c5a06363
Author: Pino Toscano <ptoscano at redhat.com>
Date: Wed Jun 3 16:13:43 2015 +0200
mllib: use Unix.gettimeofday instead of Unix.time
Unix.gettimeofday returns a finer resolution than seconds, which is what
we need since deciseconds of timestamps are printed.
---
mllib/common_utils.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 32e908d..516cff3 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -282,11 +282,11 @@ let verbose () = !verbose
(* Timestamped progress messages, used for ordinary messages when not
* --quiet.
*)
-let start_t = Unix.time ()
+let start_t = Unix.gettimeofday ()
let message fs =
let display str =
if not (quiet ()) then (
- let t = sprintf "%.1f" (Unix.time () -. start_t) in
+ let t = sprintf "%.1f" (Unix.gettimeofday () -. start_t) in
printf "[%6s] " t;
ansi_green ();
printf "%s" str;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list