aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/system.ml
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-12-29 13:41:29 +0100
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-12-29 13:41:29 +0100
commitc0e5746e6b273eb4592d24867da55dde40b656c9 (patch)
treef19c8de545f461a7cf8abfbbd7747e8020a9b8a0 /lib/system.ml
parent7e319ad03aba413f3165b848eaf821b364f9291b (diff)
parented09ae7a473a99c914f2af64d3387d9190e85849 (diff)
Merge PR #6433: [flags] Move global time flag into an attribute.
Diffstat (limited to 'lib/system.ml')
-rw-r--r--lib/system.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/system.ml b/lib/system.ml
index 2c8dbac7c..e56736eb1 100644
--- a/lib/system.ml
+++ b/lib/system.ml
@@ -294,18 +294,18 @@ let fmt_time_difference (startreal,ustart,sstart) (stopreal,ustop,sstop) =
real (round (sstop -. sstart)) ++ str "s" ++
str ")"
-let with_time time f x =
+let with_time ~batch f x =
let tstart = get_time() in
- let msg = if time then "" else "Finished transaction in " in
+ let msg = if batch then "" else "Finished transaction in " in
try
let y = f x in
let tend = get_time() in
- let msg2 = if time then "" else " (successful)" in
+ let msg2 = if batch then "" else " (successful)" in
Feedback.msg_info (str msg ++ fmt_time_difference tstart tend ++ str msg2);
y
with e ->
let tend = get_time() in
- let msg = if time then "" else "Finished failing transaction in " in
- let msg2 = if time then "" else " (failure)" in
+ let msg = if batch then "" else "Finished failing transaction in " in
+ let msg2 = if batch then "" else " (failure)" in
Feedback.msg_info (str msg ++ fmt_time_difference tstart tend ++ str msg2);
raise e