From d94dbe2eca3ace84a23bfff30c729662a4486a5a Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Thu, 2 Aug 2007 00:33:50 +0000 Subject: fix name clash in s_audio_jack.c (again) and applied some sourceforge patches svn path=/trunk/; revision=8342 --- pd/src/x_misc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pd/src/x_misc.c') diff --git a/pd/src/x_misc.c b/pd/src/x_misc.c index 411304fa..0c894c72 100644 --- a/pd/src/x_misc.c +++ b/pd/src/x_misc.c @@ -22,7 +22,10 @@ #endif #if defined (__APPLE__) || defined (__FreeBSD__) -#define HZ CLK_TCK +#define CLOCKHZ CLK_TCK +#endif +#if defined (__linux__) +#define CLOCKHZ sysconf(_SC_CLK_TCK) #endif /* -------------------------- random ------------------------------ */ @@ -230,7 +233,7 @@ static void cputime_bang2(t_cputime *x) times(&newcputime); elapsedcpu = 1000 * ( newcputime.tms_utime + newcputime.tms_stime - - x->x_setcputime.tms_utime - x->x_setcputime.tms_stime) / HZ; + x->x_setcputime.tms_utime - x->x_setcputime.tms_stime) / CLOCKHZ; outlet_float(x->x_obj.ob_outlet, elapsedcpu); #endif #ifdef MSW -- cgit v1.2.1