How to figure out the amount of time my code has taken in ocaml? are there any functions to measure that?
You can use Sys.time(). It returns the processor time, in seconds, used by the program since the beginning of execution.
Source : http://caml.inria.fr/pub/docs/manual-ocaml/libref/Sys.html