(* ||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 L.warn (P.sprintf "USR TIME STAMP (%s): %f (%f)" msg stamp lap); old := stamp let gmtime msg = let gmt = Unix.gmtime (Unix.time ()) in let yy = gmt.Unix.tm_year + 1900 in let mm = gmt.Unix.tm_mon + 1 in let dd = gmt.Unix.tm_mday in let h = gmt.Unix.tm_hour in let m = gmt.Unix.tm_min in let s = gmt.Unix.tm_sec in L.warn ( P.sprintf "UTC TIME STAMP (%s): %u/%u/%u %u:%u:%u" msg yy mm dd h m s )