Title: Remaining delay calculation for background task is calculated from the wrong time. · Issue #1706 · androidannotations/androidannotations · GitHub
Open Graph Title: Remaining delay calculation for background task is calculated from the wrong time. · Issue #1706 · androidannotations/androidannotations
X Title: Remaining delay calculation for background task is calculated from the wrong time. · Issue #1706 · androidannotations/androidannotations
Description: Version 4.0 Snapshot When calling a background method delayed with a delay and serial from a method entry with the same serial, the remaining delay of method delayed is calculated wrong after the execution of entry. @Background(serial = ...
Open Graph Description: Version 4.0 Snapshot When calling a background method delayed with a delay and serial from a method entry with the same serial, the remaining delay of method delayed is calculated wrong after the e...
X Description: Version 4.0 Snapshot When calling a background method delayed with a delay and serial from a method entry with the same serial, the remaining delay of method delayed is calculated wrong after the e...
Opengraph URL: https://github.com/androidannotations/androidannotations/issues/1706
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remaining delay calculation for background task is calculated from the wrong time.","articleBody":"**Version 4.0 Snapshot**\n\nWhen calling a background method `delayed` with a delay and serial from a method `entry` with the same serial, the remaining delay of method `delayed` is calculated wrong after the execution of `entry`.\n\n```\n@Background(serial = \"foo\")\nprotected void entry() {\n long executionTime = System.currentTimeMillis();\n delayed(executionTime);\n}\n\n@Background(serial = \"foo\", id = \"delayedTask\", delay = 20000L)\nprotected void delayed(final long execTime) {\n boolean test = System.currentTimeMillis() - execTime \u003e= 20000L;\n Log.d(\"bug\", String.valueOf(test));\n}\n```\n\nThe test returns `false`.\n\nThis is caused by wrong calculation in [BackgroundExecutor Line 429](https://github.com/excilys/androidannotations/blob/develop/AndroidAnnotations/androidannotations-core/androidannotations-api/src/main/java/org/androidannotations/api/BackgroundExecutor.java#L429). It calculates the delay of the next task from the `targetTimeMillis` of the currently finishing task when it should use `targetTimeMillis` of the next task.\n\n**Note**\nI did not test the behaviour of the @UiThread executor. It could be possible the issue occurs there as well.\n","author":{"url":"https://github.com/couchcrew-thomas","@type":"Person","name":"couchcrew-thomas"},"datePublished":"2016-02-26T14:35:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1706/androidannotations/issues/1706"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2ad38146-f984-248e-6e19-261e5ed38a18 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4BA:22E33:ACA17:109F4A:6A63818B |
| html-safe-nonce | 1cef172f8d66a8829b81dfdf18c05a3f5e5da73e916dff25d88b164ada704931 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEJBOjIyRTMzOkFDQTE3OjEwOUY0QTo2QTYzODE4QiIsInZpc2l0b3JfaWQiOiI1MTczODU4NjQ0NjgyNTcyMTcxIiwicmVnaW9uX2VkZ2UiOiJ3ZXN0dXMyIiwicmVnaW9uX3JlbmRlciI6Indlc3R1czIifQ== |
| visitor-hmac | 978a04ae0d0787a9e56564d384708454d088eb43e118aa53e83e7b85fd851b44 |
| hovercard-subject-tag | issue:136714500 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/androidannotations/androidannotations/1706/issue_layout |
| twitter:image | https://opengraph.githubassets.com/612d3af66d98df076d4fa888a7ee1eeb28e303670628ddea78487e5ec188480b/androidannotations/androidannotations/issues/1706 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/612d3af66d98df076d4fa888a7ee1eeb28e303670628ddea78487e5ec188480b/androidannotations/androidannotations/issues/1706 |
| og:image:alt | Version 4.0 Snapshot When calling a background method delayed with a delay and serial from a method entry with the same serial, the remaining delay of method delayed is calculated wrong after the e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | couchcrew-thomas |
| hostname | github.com |
| expected-hostname | github.com |
| None | e4fb64aef87da454ec25b158147f7f5f14aef29216e5ca1612c2e48faa599d1f |
| turbo-cache-control | no-preview |
| go-import | github.com/androidannotations/androidannotations git https://github.com/androidannotations/androidannotations.git |
| octolytics-dimension-user_id | 1315313 |
| octolytics-dimension-user_login | androidannotations |
| octolytics-dimension-repository_id | 3116751 |
| octolytics-dimension-repository_nwo | androidannotations/androidannotations |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3116751 |
| octolytics-dimension-repository_network_root_nwo | androidannotations/androidannotations |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e839936ba5faffb9c836dda1cf4729d50c88a32e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width