Re: [RS] multiple beepage
Re: [RS] multiple beepage
- Subject: Re: [RS] multiple beepage
- From: Michael Watson <email@hidden>
- Date: Fri, 22 Dec 2006 09:53:18 -0500
sleep() blocks the thread. NSTimer is the way to go.
--
m-s
On 22 Dec, 2006, at 09:46, Tommy Nordgren wrote:
On 22 dec 2006, at 14.35, Roland Silver wrote:
How do I NSBeep N times, with a short but distinct interval of
silence between beeps?
--Roland Silver <email@hidden>
_______________________________________________
#include <Carbon/Carbon.h>
void beep_n (int n)
{
int i;
for (i = 0; i < n; i++) {
SysBeep(1);
if ( i < n-1)sleep (SOMEDELAYTIME);
}
}
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
40bungie.org
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden