source file of the Flower Library
- (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "cpu-timer.hh"
// nextstep
#ifndef CLOCKS_PER_SEC
#ifdef CLK_TCK
-#define CLOCKS_PER_SEC CLK_TCK
+#define CLOCKS_PER_SEC CLK_TCK
#elif defined _SC_CLK_TCK
-#define CLOCKS_PER_SEC sysconf (_SC_CLK_TCK)
+#define CLOCKS_PER_SEC sysconf (_SC_CLK_TCK)
#else
#error cannot determine CLOCKS_PER_SEC
#endif
Cpu_timer::read ()
{
clock_t stop = clock ();
- return (stop-start_clock_)/Real (CLOCKS_PER_SEC);
+ return (stop - start_clock_) / Real (CLOCKS_PER_SEC);
}