Skip to content

skcho/timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timer

A simple timer for OCaml

Install

opam pin add timer https://github.com/skcho/timer.git

Example

let foo x =
  Timer.start "a"; (* Timer "a" starts. *)
  ...
  Timer.start "b"; (* Timer "a" stops. Time of "a" is accumulated.
                      Timer "b" starts. *)
  ...
  Timer.stop ()    (* Timer "b" stops. Time of "b" is accumulated. *)
in
List.iter foo l;
Timer.flush        (* All accumulated times are printed. *)

See test for more examples.

About

A simple timer for OCaml

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published