]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/cpu-timer.cc
* configure.in: Test for and accept lmodern if EC fonts not found.
[lilypond.git] / flower / cpu-timer.cc
index e10985eee9849284fe30ca22b22bfee8f564b980..f66d657be4611cf40f7ad6c67b313d6f2817470d 100644 (file)
@@ -3,11 +3,23 @@
 
   source file of the Flower Library
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "cpu-timer.hh"
 
+#include <unistd.h>
+// nextstep
+#ifndef CLOCKS_PER_SEC
+#ifdef CLK_TCK
+#define CLOCKS_PER_SEC  CLK_TCK
+#elif defined _SC_CLK_TCK
+#define CLOCKS_PER_SEC  sysconf (_SC_CLK_TCK)
+#else
+#error cannot determine CLOCKS_PER_SEC
+#endif
+#endif
+
 Cpu_timer::Cpu_timer ()
 {
   restart ();
@@ -22,5 +34,5 @@ Real
 Cpu_timer::read ()
 {
   clock_t stop = clock ();
-  return (stop-start_clock_)/Real(CLOCKS_PER_SEC);
+  return (stop-start_clock_)/Real (CLOCKS_PER_SEC);
 }