From: fred Date: Fri, 12 Sep 1997 22:30:23 +0000 (+0000) Subject: lilypond-0.1.14 X-Git-Tag: release/1.5.59~6058 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=53db88b2b567cef1ffe31e83a2bbdedd668d471d;p=lilypond.git lilypond-0.1.14 --- diff --git a/flower/cpu-timer.cc b/flower/cpu-timer.cc new file mode 100644 index 0000000000..e10985eee9 --- /dev/null +++ b/flower/cpu-timer.cc @@ -0,0 +1,26 @@ +/* + cpu-timer.cc -- implement Cpu_timer + + source file of the Flower Library + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "cpu-timer.hh" + +Cpu_timer::Cpu_timer () +{ + restart (); +} +void +Cpu_timer::restart () +{ + start_clock_ = clock (); +} + +Real +Cpu_timer::read () +{ + clock_t stop = clock (); + return (stop-start_clock_)/Real(CLOCKS_PER_SEC); +}