> Am 28.07.2017 um 17:57 schrieb Mark Allan <markjal...@gmail.com>: > > Setting the max value to 100 and only updating 100 times (i.e. as a > percentage) seems too infrequent because the loop can iterate more than a > million times.
Just keep track of the time of the last update and do it every 0.1 seconds or so. Redrawing a progress bar 10 times a second shouldn't have any noticeable impact on the CPU and you'll still get a fluid (enough) animation. While you could use a timer, that seems unnecessarily complicated. Andreas _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com