void secondsLatterProcessEvents(unsigned int time)
{
MSG msg;
while(true)
{
while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) )
{ TranslateMessage(&msg);
DispatchMessage(&msg);
}
sleep(100);
time -= 100;
if(time <= 0)break;
}
}
如何在Mac Xcode编译环境下实现相同的功能,即对于某个进程而言,暂停一段时间,但不会影响线程的消息处理。。
UIAlertView *a =[[UIAlertView alloc] initWithTitle:(NSString *)title
message:(NSString *)message
delegate:self
cancelButtonTitle:(NSString *)cancelButtonTitle
otherButtonTitles:nil];
[a show];
[a release];