Running time in Ocaml

后端 未结 3 1533
挽巷
挽巷 2020-12-11 01:46

How to figure out the amount of time my code has taken in ocaml? are there any functions to measure that?

3条回答
  •  甜味超标
    2020-12-11 02:35

    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

提交回复
热议问题