Module Ext.Timer

module Timer: sig .. end
Named timers. Each timer is associated with a string name. Operations are starting, stopping (or pausing), and checking the time elapsed on the named timer. A single timer may be started and stopped multiple times, and the elapsed time will always be the total time spent running.

val start_time_hash : (string, float) Ext.Hashtbl.t
Hash of start times.
val elapsed_time_hash : (string, float) Ext.Hashtbl.t
Hash of accumulated elapsed times.
val last_elapsed_time_hash : (string, float) Ext.Hashtbl.t
Hash of last elapsed times.
val start : string -> unit
starts name starts a timer with the name name. Does nothing if timer has already been started.
val delta : string -> float
delta name returns time passed since the timer name was most recently started or delta was last called for this timer. Useful for timing sequential pieces.
val elapsed : string -> float
elapsed name returns the amount of time elapsed on the timer name. Counts time since the timer was started, excluding time while it was stopped.
val last_elapsed : string -> float
last_elapsed name returns the amount of time elapsed between last start and stop on timer name.
val stop : string -> unit
stop name stops the timer name. This pauses it until restarted with start.
val clear : string -> unit
clear name stops the timer name and sets its elapsed time to zero.