2 cpu-timer.cc -- implement Cpu_timer
4 source file of the Flower Library
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "cpu-timer.hh"
12 #ifndef CLOCKS_PER_SEC
13 #define CLOCKS_PER_SEC CLK_TCK
17 Cpu_timer::Cpu_timer ()
24 start_clock_ = clock ();
30 clock_t stop = clock ();
31 return (stop-start_clock_)/Real(CLOCKS_PER_SEC);