Code snippet for dispatch_after uses a decimal for an int.
| Originator: | abizern | ||
| Number: | rdar://12517014 | Date Originated: | 17/10/2012 |
| Status: | Duplicate | Resolved: | 17/10/2012 |
| Product: | Developer Tools | Product Version: | 4.5.1 |
| Classification: | Other Bug | Reproducible: | Always |
Summary:
The code snippet library has a snippet for dispatch_after:
int64_t delayInSeconds = 2.0;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
<#code to be executed on the main queue after delay#>
});
the delay in seconds is typed to int64_t, bu the initial value from the snippet is 2.0;
I think this would be better as 2;
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Closed as a duplicate
12048545