mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user