--- /dev/null
+module Utils
+
+open System.Diagnostics
+
+let roundInt = int << round
+
+let inline dprintfn fmt =
+ Printf.ksprintf System.Diagnostics.Debug.WriteLine fmt
+
+let mutable log : (string -> unit) =
+ fun m -> ()
+
+let logTime (m: string) (f: unit -> 'a) : 'a =
+ let sw = Stopwatch()
+ sw.Start()
+ let res = f ()
+ sw.Stop()
+ log <| sprintf "%A (time: %A ms)" m sw.ElapsedMilliseconds
+ res
\ No newline at end of file