+(*
+ ||M|| This file is part of HELM, an Hypertextual, Electronic
+ ||A|| Library of Mathematics, developed at the Computer Science
+ ||T|| Department, University of Bologna, Italy.
+ ||I||
+ ||T|| HELM is free software; you can redistribute it and/or
+ ||A|| modify it under the terms of the GNU General Public License
+ \ / version 2 or (at your option) any later version.
+ \ / This software is distributed as is, NO WARRANTY.
+ V_______________________________________________________________ *)
+
+module P = Printf
+module L = Log
+
let utime_stamp =
let old = ref 0.0 in
fun msg ->
let times = Unix.times () in
let stamp = times.Unix.tms_utime in
let lap = stamp -. !old in
- Printf.printf "UTIME STAMP (%s): %f (%f)\n" msg stamp lap; flush stdout;
+ L.warn (P.sprintf "UTIME STAMP (%s): %f (%f)" msg stamp lap);
old := stamp
let gmtime msg =
let h = gmt.Unix.tm_hour in
let m = gmt.Unix.tm_min in
let s = gmt.Unix.tm_sec in
- Printf.printf "UTC TIME STAMP (%s): %u/%u/%u %u:%u:%u\n"
- msg yy mm dd h m s;
- flush stdout
+ L.warn (
+ P.sprintf "UTC TIME STAMP (%s): %u/%u/%u %u:%u:%u" msg yy mm dd h m s
+ )