]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/lib/time.ml
log facility, initial environment for basic_rg
[helm.git] / helm / software / lambda-delta / lib / time.ml
index 2ea295a85715817fe34128c3eaf8aa8898b3813e..f139fdfbe6b3f9b5c87fd7a0b40c0f6d86f1adc8 100644 (file)
@@ -1,10 +1,24 @@
+(*
+    ||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 =
@@ -15,6 +29,6 @@ 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
+   )