Merge pull request #1965 from samoht/mtime

sdk: update the tests to use mtime 1.0 and logs.fmt
This commit is contained in:
Justin Cormack 2017-06-06 13:44:38 +01:00 committed by GitHub
commit b460a718cc
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,8 @@
(executables (executables
((names (test)) ((names (test))
(libraries (sdk alcotest astring mtime.os mirage-flow-lwt)))) (libraries (sdk alcotest astring mtime mtime.clock.os mirage-flow-lwt
logs.fmt))))
(alias (alias
((name runtest) ((name runtest)

View File

@ -283,7 +283,7 @@ let reporter ?(prefix="") () =
let k _ = over (); k () in let k _ = over (); k () in
let ppf = match level with Logs.App -> Fmt.stdout | _ -> Fmt.stderr in let ppf = match level with Logs.App -> Fmt.stdout | _ -> Fmt.stderr in
let with_stamp h _tags k fmt = let with_stamp h _tags k fmt =
let dt = Mtime.to_us (Mtime.elapsed ()) in let dt = Mtime.Span.to_us (Mtime_clock.elapsed ()) in
Fmt.kpf k ppf ("%s%+04.0fus %a %a @[" ^^ fmt ^^ "@]@.") Fmt.kpf k ppf ("%s%+04.0fus %a %a @[" ^^ fmt ^^ "@]@.")
prefix prefix
dt dt