{"action":"created","comment":{"url":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/comments/22702812","id":22702812,"diff_hunk":"@@ -89,6 +96,15 @@\n \tprivate String milestonesETag = null;\n \tprivate String issueCheckTime = null;\n \t\n+\tprivate final ScheduledExecutorService pollExecutor = Executors.newScheduledThreadPool(1);\n+\tprivate ScheduledFuture<?> pollHandler;\n+\tprivate long pollInterval = 60000; //time between polls in ms\n+\tprivate int stopwatchInterval = 1000;\n+\tprivate int timeRemaining = 60;\n+\tprivate static final int SECS = 60;","path":"src/service/ServiceManager.java","position":30,"original_position":30,"commit_id":"42183beb3624eb4cf647a07a36eedf0b0c49e76c","original_commit_id":"42183beb3624eb4cf647a07a36eedf0b0c49e76c","user":{"login":"dariusf","id":4328341,"avatar_url":"https://avatars.githubusercontent.com/u/4328341?v=3","gravatar_id":"","url":"https://api.github.com/users/dariusf","html_url":"https://github.com/dariusf","followers_url":"https://api.github.com/users/dariusf/followers","following_url":"https://api.github.com/users/dariusf/following{/other_user}","gists_url":"https://api.github.com/users/dariusf/gists{/gist_id}","starred_url":"https://api.github.com/users/dariusf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dariusf/subscriptions","organizations_url":"https://api.github.com/users/dariusf/orgs","repos_url":"https://api.github.com/users/dariusf/repos","events_url":"https://api.github.com/users/dariusf/events{/privacy}","received_events_url":"https://api.github.com/users/dariusf/received_events","type":"User","site_admin":false},"body":"Maybe you could move `SECS` to the top and have the other variables depend on it, i.e. `pollInterval = SECS * 1000`, etc. Also it could be named `TIME_BETWEEN_POLLS` (from the comment) or something.","created_at":"2015-01-09T06:07:53Z","updated_at":"2015-01-09T06:07:53Z","html_url":"https://github.com/HubTurbo/HubTurbo/pull/344#discussion_r22702812","pull_request_url":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/344","_links":{"self":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/comments/22702812"},"html":{"href":"https://github.com/HubTurbo/HubTurbo/pull/344#discussion_r22702812"},"pull_request":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/344"}}},"pull_request":{"url":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/344","id":27017287,"html_url":"https://github.com/HubTurbo/HubTurbo/pull/344","diff_url":"https://github.com/HubTurbo/HubTurbo/pull/344.diff","patch_url":"https://github.com/HubTurbo/HubTurbo/pull/344.patch","issue_url":"https://api.github.com/repos/HubTurbo/HubTurbo/issues/344","number":344,"state":"open","locked":false,"title":"Prevent timers from creating multiple threads #343","user":{"login":"taychunmei","id":2648455,"avatar_url":"https://avatars.githubusercontent.com/u/2648455?v=3","gravatar_id":"","url":"https://api.github.com/users/taychunmei","html_url":"https://github.com/taychunmei","followers_url":"https://api.github.com/users/taychunmei/followers","following_url":"https://api.github.com/users/taychunmei/following{/other_user}","gists_url":"https://api.github.com/users/taychunmei/gists{/gist_id}","starred_url":"https://api.github.com/users/taychunmei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taychunmei/subscriptions","organizations_url":"https://api.github.com/users/taychunmei/orgs","repos_url":"https://api.github.com/users/taychunmei/repos","events_url":"https://api.github.com/users/taychunmei/events{/privacy}","received_events_url":"https://api.github.com/users/taychunmei/received_events","type":"User","site_admin":false},"body":"fixes #343, partial fix for #282 ","created_at":"2015-01-08T09:55:14Z","updated_at":"2015-01-09T06:07:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbcc278809f0f5201ad0fd0967b696eb9186507c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/344/commits","review_comments_url":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/344/comments","review_comment_url":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/HubTurbo/HubTurbo/issues/344/comments","statuses_url":"https://api.github.com/repos/HubTurbo/HubTurbo/statuses/42183beb3624eb4cf647a07a36eedf0b0c49e76c","head":{"label":"HubTurbo:Issue343","ref":"Issue343","sha":"42183beb3624eb4cf647a07a36eedf0b0c49e76c","user":{"login":"HubTurbo","id":7955871,"avatar_url":"https://avatars.githubusercontent.com/u/7955871?v=3","gravatar_id":"","url":"https://api.github.com/users/HubTurbo","html_url":"https://github.com/HubTurbo","followers_url":"https://api.github.com/users/HubTurbo/followers","following_url":"https://api.github.com/users/HubTurbo/following{/other_user}","gists_url":"https://api.github.com/users/HubTurbo/gists{/gist_id}","starred_url":"https://api.github.com/users/HubTurbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubTurbo/subscriptions","organizations_url":"https://api.github.com/users/HubTurbo/orgs","repos_url":"https://api.github.com/users/HubTurbo/repos","events_url":"https://api.github.com/users/HubTurbo/events{/privacy}","received_events_url":"https://api.github.com/users/HubTurbo/received_events","type":"Organization","site_admin":false},"repo":{"id":20919534,"name":"HubTurbo","full_name":"HubTurbo/HubTurbo","owner":{"login":"HubTurbo","id":7955871,"avatar_url":"https://avatars.githubusercontent.com/u/7955871?v=3","gravatar_id":"","url":"https://api.github.com/users/HubTurbo","html_url":"https://github.com/HubTurbo","followers_url":"https://api.github.com/users/HubTurbo/followers","following_url":"https://api.github.com/users/HubTurbo/following{/other_user}","gists_url":"https://api.github.com/users/HubTurbo/gists{/gist_id}","starred_url":"https://api.github.com/users/HubTurbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubTurbo/subscriptions","organizations_url":"https://api.github.com/users/HubTurbo/orgs","repos_url":"https://api.github.com/users/HubTurbo/repos","events_url":"https://api.github.com/users/HubTurbo/events{/privacy}","received_events_url":"https://api.github.com/users/HubTurbo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubTurbo/HubTurbo","description":"","fork":false,"url":"https://api.github.com/repos/HubTurbo/HubTurbo","forks_url":"https://api.github.com/repos/HubTurbo/HubTurbo/forks","keys_url":"https://api.github.com/repos/HubTurbo/HubTurbo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubTurbo/HubTurbo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubTurbo/HubTurbo/teams","hooks_url":"https://api.github.com/repos/HubTurbo/HubTurbo/hooks","issue_events_url":"https://api.github.com/repos/HubTurbo/HubTurbo/issues/events{/number}","events_url":"https://api.github.com/repos/HubTurbo/HubTurbo/events","assignees_url":"https://api.github.com/repos/HubTurbo/HubTurbo/assignees{/user}","branches_url":"https://api.github.com/repos/HubTurbo/HubTurbo/branches{/branch}","tags_url":"https://api.github.com/repos/HubTurbo/HubTurbo/tags","blobs_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubTurbo/HubTurbo/statuses/{sha}","languages_url":"https://api.github.com/repos/HubTurbo/HubTurbo/languages","stargazers_url":"https://api.github.com/repos/HubTurbo/HubTurbo/stargazers","contributors_url":"https://api.github.com/repos/HubTurbo/HubTurbo/contributors","subscribers_url":"https://api.github.com/repos/HubTurbo/HubTurbo/subscribers","subscription_url":"https://api.github.com/repos/HubTurbo/HubTurbo/subscription","commits_url":"https://api.github.com/repos/HubTurbo/HubTurbo/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubTurbo/HubTurbo/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubTurbo/HubTurbo/issues/comments/{number}","contents_url":"https://api.github.com/repos/HubTurbo/HubTurbo/contents/{+path}","compare_url":"https://api.github.com/repos/HubTurbo/HubTurbo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubTurbo/HubTurbo/merges","archive_url":"https://api.github.com/repos/HubTurbo/HubTurbo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubTurbo/HubTurbo/downloads","issues_url":"https://api.github.com/repos/HubTurbo/HubTurbo/issues{/number}","pulls_url":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls{/number}","milestones_url":"https://api.github.com/repos/HubTurbo/HubTurbo/milestones{/number}","notifications_url":"https://api.github.com/repos/HubTurbo/HubTurbo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubTurbo/HubTurbo/labels{/name}","releases_url":"https://api.github.com/repos/HubTurbo/HubTurbo/releases{/id}","created_at":"2014-06-17T10:35:39Z","updated_at":"2015-01-09T04:28:12Z","pushed_at":"2015-01-09T05:36:17Z","git_url":"git://github.com/HubTurbo/HubTurbo.git","ssh_url":"git@github.com:HubTurbo/HubTurbo.git","clone_url":"https://github.com/HubTurbo/HubTurbo.git","svn_url":"https://github.com/HubTurbo/HubTurbo","homepage":null,"size":60513,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":82,"forks":1,"open_issues":82,"watchers":3,"default_branch":"master"}},"base":{"label":"HubTurbo:master","ref":"master","sha":"bd268d3596635bc06de5c8069d96309c9c5e89cd","user":{"login":"HubTurbo","id":7955871,"avatar_url":"https://avatars.githubusercontent.com/u/7955871?v=3","gravatar_id":"","url":"https://api.github.com/users/HubTurbo","html_url":"https://github.com/HubTurbo","followers_url":"https://api.github.com/users/HubTurbo/followers","following_url":"https://api.github.com/users/HubTurbo/following{/other_user}","gists_url":"https://api.github.com/users/HubTurbo/gists{/gist_id}","starred_url":"https://api.github.com/users/HubTurbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubTurbo/subscriptions","organizations_url":"https://api.github.com/users/HubTurbo/orgs","repos_url":"https://api.github.com/users/HubTurbo/repos","events_url":"https://api.github.com/users/HubTurbo/events{/privacy}","received_events_url":"https://api.github.com/users/HubTurbo/received_events","type":"Organization","site_admin":false},"repo":{"id":20919534,"name":"HubTurbo","full_name":"HubTurbo/HubTurbo","owner":{"login":"HubTurbo","id":7955871,"avatar_url":"https://avatars.githubusercontent.com/u/7955871?v=3","gravatar_id":"","url":"https://api.github.com/users/HubTurbo","html_url":"https://github.com/HubTurbo","followers_url":"https://api.github.com/users/HubTurbo/followers","following_url":"https://api.github.com/users/HubTurbo/following{/other_user}","gists_url":"https://api.github.com/users/HubTurbo/gists{/gist_id}","starred_url":"https://api.github.com/users/HubTurbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubTurbo/subscriptions","organizations_url":"https://api.github.com/users/HubTurbo/orgs","repos_url":"https://api.github.com/users/HubTurbo/repos","events_url":"https://api.github.com/users/HubTurbo/events{/privacy}","received_events_url":"https://api.github.com/users/HubTurbo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubTurbo/HubTurbo","description":"","fork":false,"url":"https://api.github.com/repos/HubTurbo/HubTurbo","forks_url":"https://api.github.com/repos/HubTurbo/HubTurbo/forks","keys_url":"https://api.github.com/repos/HubTurbo/HubTurbo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubTurbo/HubTurbo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubTurbo/HubTurbo/teams","hooks_url":"https://api.github.com/repos/HubTurbo/HubTurbo/hooks","issue_events_url":"https://api.github.com/repos/HubTurbo/HubTurbo/issues/events{/number}","events_url":"https://api.github.com/repos/HubTurbo/HubTurbo/events","assignees_url":"https://api.github.com/repos/HubTurbo/HubTurbo/assignees{/user}","branches_url":"https://api.github.com/repos/HubTurbo/HubTurbo/branches{/branch}","tags_url":"https://api.github.com/repos/HubTurbo/HubTurbo/tags","blobs_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubTurbo/HubTurbo/statuses/{sha}","languages_url":"https://api.github.com/repos/HubTurbo/HubTurbo/languages","stargazers_url":"https://api.github.com/repos/HubTurbo/HubTurbo/stargazers","contributors_url":"https://api.github.com/repos/HubTurbo/HubTurbo/contributors","subscribers_url":"https://api.github.com/repos/HubTurbo/HubTurbo/subscribers","subscription_url":"https://api.github.com/repos/HubTurbo/HubTurbo/subscription","commits_url":"https://api.github.com/repos/HubTurbo/HubTurbo/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubTurbo/HubTurbo/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubTurbo/HubTurbo/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubTurbo/HubTurbo/issues/comments/{number}","contents_url":"https://api.github.com/repos/HubTurbo/HubTurbo/contents/{+path}","compare_url":"https://api.github.com/repos/HubTurbo/HubTurbo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubTurbo/HubTurbo/merges","archive_url":"https://api.github.com/repos/HubTurbo/HubTurbo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubTurbo/HubTurbo/downloads","issues_url":"https://api.github.com/repos/HubTurbo/HubTurbo/issues{/number}","pulls_url":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls{/number}","milestones_url":"https://api.github.com/repos/HubTurbo/HubTurbo/milestones{/number}","notifications_url":"https://api.github.com/repos/HubTurbo/HubTurbo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubTurbo/HubTurbo/labels{/name}","releases_url":"https://api.github.com/repos/HubTurbo/HubTurbo/releases{/id}","created_at":"2014-06-17T10:35:39Z","updated_at":"2015-01-09T04:28:12Z","pushed_at":"2015-01-09T05:36:17Z","git_url":"git://github.com/HubTurbo/HubTurbo.git","ssh_url":"git@github.com:HubTurbo/HubTurbo.git","clone_url":"https://github.com/HubTurbo/HubTurbo.git","svn_url":"https://github.com/HubTurbo/HubTurbo","homepage":null,"size":60513,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":82,"forks":1,"open_issues":82,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/344"},"html":{"href":"https://github.com/HubTurbo/HubTurbo/pull/344"},"issue":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/issues/344"},"comments":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/issues/344/comments"},"review_comments":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/344/comments"},"review_comment":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/pulls/344/commits"},"statuses":{"href":"https://api.github.com/repos/HubTurbo/HubTurbo/statuses/42183beb3624eb4cf647a07a36eedf0b0c49e76c"}}}}