123456789101112131415161718192021222324(* This file is free software, part of dolmen. See file "LICENSE" for more information *)(* Simple timer *)(* ************************************************************************* *)typet={mutablestart:float;(* start of the timer *)}letstart()=(* allocate the recors before calling gettimeofday to
avoid counting the time of the record allocation in the
timer. *)lett={start=0.;}int.start<-Unix.gettimeofday();tletstopt=letstop=Unix.gettimeofday()instop-.t.start