Source file Debug.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
(*
   Log messages for debugging purposes

   This is mostly for tracing the master/worker interactions.
*)

open Printf

let debug = ref false

let log make_msg =
  if !debug then
    eprintf "[DEBUG] [%.6f] %s\n%!" (Unix.gettimeofday ()) (make_msg ())