NS.TimerTimers for runtime statistics
val create :
?at_exit:
(name:string -> elapsed:float -> aggregate:float -> count:int -> unit) ->
string ->
tConstruct a timer with the given name and register the given function to run at exit. The at_exit function receives name: the name of the timer passed to create, elapsed: the number of milliseconds between the longest single start-stop pair, aggregate: the sum of the time that elapsed while the named timer was running, count: the number of times stop was called on the timer.
val start : t -> unitStart a timer.
val stop : t -> unitStop a timer.
val stop_report :
t ->
(name:string -> elapsed:float -> aggregate:float -> count:int -> unit) ->
unitStop a timer and report using the given function, which receives name: the name of the timer passed to create, elapsed: the number of milliseconds since start was called, aggregate: the sum of the time that has elapsed while the timer was running, count: the number of times stop has been called on the timer.