开发者

check first with timestamp?

do i save some time when having a timestamp and o开发者_JS百科nly ask the operation isCancelled every 50 msec?


isCancelled is a pretty simple BOOL flag, so checking it on each iteration of even a very tight loop doesn't incur a real performance penalty. I think you'll find the overhead of setting up a mechanism to check isCancelled periodically will actually perform worse.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜