From cde1ee8fa147dfd15dc5c5b43093cd8c8a402b74 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Wed, 16 Jan 2008 21:54:11 +0000 Subject: 0.41-0 test 11 svn path=/trunk/; revision=9147 --- pd/src/s_inter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pd/src/s_inter.c') diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c index 816e6207..85a5af30 100644 --- a/pd/src/s_inter.c +++ b/pd/src/s_inter.c @@ -250,12 +250,14 @@ static void sys_huphandler(int n) void sys_setalarm(int microsec) { struct itimerval gonzo; + int sec = (int)(microsec/1000000); + microsec %= 1000000; #if 0 - fprintf(stderr, "timer %d\n", microsec); + fprintf(stderr, "timer %d:%d\n", sec, microsec); #endif gonzo.it_interval.tv_sec = 0; gonzo.it_interval.tv_usec = 0; - gonzo.it_value.tv_sec = 0; + gonzo.it_value.tv_sec = sec; gonzo.it_value.tv_usec = microsec; if (microsec) sys_signal(SIGALRM, sys_alarmhandler); -- cgit v1.2.1