{ "id": "129926", "key": "TIMOB-17146", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-05-03T13:53:21.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:44.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Time of taking window size depends on something and varies from (<=1) millisecond and up to tens of milliseconds. See the attached screenshots.\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n{code}\r\n$.theWindow.open();\r\n\r\nvar interval = 100;\r\n\r\nfunction step() {\r\n var beginTime = new Date().getTime();\r\n /////\r\n var size = $.theWindow.size;\r\n ///// \r\n var endTime = new Date().getTime();\r\n \r\n var executionTime = endTime - beginTime;\r\n $.label1.setText(executionTime); \r\n}\r\n\r\nvar timerId1 = setInterval(step, interval);\r\n\r\nfunction updateLabel() {\r\n $.label2.setText('Interval: ' + interval + ' ms');\r\n}\r\n\r\nvar timerId = setInterval(updateLabel, interval);\r\n\r\nfunction onButton() {\r\n if (interval == 100) {\r\n interval = 1;\r\n }\r\n else if (interval == 1) {\r\n interval = 10;\r\n }\r\n else {\r\n interval = 100;\r\n }\r\n \r\n clearInterval(timerId);\r\n timerId = setInterval(updateLabel, interval);\r\n}\r\n{code}", "attachment": [ { "id": "47809", "filename": "interval1_1.png", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-03T13:53:21.000+0000", "size": 12894, "mimeType": "image/png" }, { "id": "47810", "filename": "interval1_2.png", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-03T13:53:21.000+0000", "size": 12921, "mimeType": "image/png" }, { "id": "47811", "filename": "interval1_3.png", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-03T13:53:21.000+0000", "size": 12633, "mimeType": "image/png" }, { "id": "47812", "filename": "interval10_1.png", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-03T13:53:22.000+0000", "size": 13159, "mimeType": "image/png" }, { "id": "47813", "filename": "interval10_2.png", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-03T13:53:22.000+0000", "size": 12899, "mimeType": "image/png" }, { "id": "47814", "filename": "interval10_3.png", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-03T13:53:22.000+0000", "size": 12806, "mimeType": "image/png" }, { "id": "47807", "filename": "interval100_1.png", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-03T13:53:21.000+0000", "size": 10741, "mimeType": "image/png" }, { "id": "47808", "filename": "interval100_2.png", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-03T13:53:21.000+0000", "size": 10854, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: $.theWindow.size execution time depends on something", "creator": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "subtasks": [], "reporter": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "environment": "Windows 7, 3.2.2.GA, Android", "comment": { "comments": [ { "id": "308602", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce the timing behavior with the provided test case, as described in this ticket.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-12T04:55:06.000+0000", "updated": "2014-06-12T04:55:06.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }