Skip navigation.
 
mlRe: CFUserNotificationDisplayNotice Timeout bug?
FROM : Daniel Jalkut
DATE : Thu Aug 31 19:42:38 2006

A discrepancy of a second or two in the worst case is acceptable, but 
this kind of granularity seems to serve nobody.

It simply doesn't take that long to spawn a separate process, IPC it, 
etc.  Why impose an unnecessary "minutes mindset" when it's not 
technically necessary?

Just to confirm that this is a bug more than a technical hurdle, I 
confirmed on my system that the behavior of the 
UserNotificationCenter process is *extremely* passive when it comes 
to paying attention to when to dismiss dialogs.

It looks like it installs a "wakeup:" NSTimer for 30 seconds after a 
notification is presented, and only then does it bother to check 
whether the timeout expiration has been reached for the dialog.

It wouldn't be unreasonable for this process to install a timer that, 
instead of expiring an arbitrary 30 seconds later, expired exactly 
when the timeout was configured for.

Right now I think you've got at a minimum a documentation bug, and it 
wouldn't be unreasonable to expect granularity of less than 30 
seconds for an API that takes a seconds-based parameter.

Daniel

On Aug 31, 2006, at 11:53 AM, Douglas Davidson wrote:

>> I'm experimenting with CFUserNotificationDisplayNotice function 
>> and have found the timeout period is inaccurate. If I pass 1, 2, 
>> 3, 30 or 40 seconds into the function it takes about 20-30 seconds 
>> for the dialog box to be displayed. Am I missing something 
>> obvious, or is this a bug?
>>
>> CFUserNotificationDisplayNotice(1, 
>> kCFUserNotificationNoteAlertLevel, NULL, NULL, NULL,CFSTR("My 
>> App"), CFSTR("This is a test error message."), NULL);

>
> There is a minimum granularity for the timeout.  Keep in mind that 
> this involves IPC to another process, which may have to be 
> launched, then become active, and display the dialog to the user, 
> who will then have to respond to it.  You should be thinking in 
> terms of minutes rather than seconds.  If you need finer control, 
> you can use one of the asynchronous calls and cancel the 
> notification yourself.

Related mailsAuthorDate
mlCFUserNotificationDisplayNotice Timeout bug? Dale Gillard Aug 31, 14:52
mlRe: CFUserNotificationDisplayNotice Timeout bug? Daniel Jalkut Aug 31, 16:17
mlRe: CFUserNotificationDisplayNotice Timeout bug? Douglas Davidson Aug 31, 17:53
mlRe: CFUserNotificationDisplayNotice Timeout bug? Daniel Jalkut Aug 31, 19:42