Re: How can I get rid of this warning message?
Re: How can I get rid of this warning message?
- Subject: Re: How can I get rid of this warning message?
- From: David Duncan <email@hidden>
- Date: Tue, 22 Jan 2013 13:04:04 -0800
On Jan 22, 2013, at 12:34 PM, Charles Srstka <email@hidden> wrote:
> int64_t delayInSeconds = 2;
> dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
> dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
> [foo doSomethingWith:bar];
> });
Just note that the template has a bug – if you want to delay for a fractional number of seconds, be certain to change the type of 'delayInSeconds' to a floating point type.
--
David Duncan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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