[AC-2729] iOS: setInterval loses 1 sec every 30 sec on certain devices
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-12-05T04:15:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Sumit Kataria |
Assignee | Paul Dowsett |
Created | 2011-12-01T21:42:48.000+0000 |
Updated | 2016-03-08T07:47:37.000+0000 |
Description
setInterval function is not working correctly. It is losing time. In common language, if a watch counts 30 sec it is counting 29 sec. Attached project will demonstrate same.
You can not replicate this in iOS simulator - this will happen only in devices.
The timer function is extremely important for my project.
Attachments
File | Date | Size |
timer.zip | 2011-12-01T21:42:48.000+0000 | 536702 |
Sumit Thank you for raising this issue. Your code contains a lot of unnecessary code that could be influencing the behavior. Would you please write a test case, as described in [Creating a Test Case](http://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase)? Also, test cases should be added to the body of the ticket rather than as an attachment, to make it easy for the engineering team to assess. Once this is done, I will be able to move it across to the main project so that the engineering team can work on it. Thanks
As kindly, and correctly, explained by JongEun, Javascript timers are not guaranteed.
This solution should resolve this for you. Hence, marking this ticket as invalid.
Thanks Paul for referring this. Yes above comment solved my blocker, but main issue is this is happening in a particular set of devices and others are behaving normally.
Closing ticket