{"action":"created","comment":{"url":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/comments/57130833","id":57130833,"diff_hunk":"@@ -84,18 +89,137 @@ class Timer {\n    */\n   bool IsRunning() const;\n   /**\n+   * @brief Suspends timer execution after next loop.\n+   */\n+  virtual void Suspend();\n+\n+  /**\n+   * @brief Stop timer update timeout and start timer again\n+   * Note that it cancel thread of timer, If you use it from callback,\n+   * it probably will stop execution of callback function\n+   * @param timeout_milliseconds new timeout value\n+   *\n+   */\n+  virtual void UpdateTimeOut(const uint32_t timeout_milliseconds);\n+\n+  /**\n    * @brief GetTimeout\n    * @return returns timeout\n    */\n   Milliseconds GetTimeout() const;\n \n  private:\n+  /**\n+   * @brief Delegate release timer, will call callback function one time\n+   */\n+  class TimerDelegate : public threads::ThreadDelegate {\n+    friend class Timer;\n+\n+   public:\n+    /**\n+     * @brief Default constructor\n+     *\n+     * @param timer_thread The Timer_thread pointer\n+     */\n+    explicit TimerDelegate(Timer* timer);\n+\n+    /**\n+     * @brief Destructor\n+     */\n+    virtual ~TimerDelegate();\n+\n+    /**\n+     * @brief Thread main function.\n+     */\n+    void threadMain() OVERRIDE;\n+\n+    /**\n+     * @brief Called by thread::thread to free all allocated resources.\n+     */\n+    void exitThreadMain() OVERRIDE;\n+\n+    /**\n+     * @brief Set new Timeout\n+     * @param timeout_milliseconds New timeout to be set\n+     */\n+    virtual void SetTimeOut(const uint32_t timeout_milliseconds);\n+\n+    /**\n+      * @brief Wait until timer will start\n+      */\n+    virtual void WaitUntilStart();\n+\n+   protected:\n+    Timer* timer_;","path":"src/components/utils/include/utils/timer.h","position":96,"original_position":96,"commit_id":"5cd44b8aebc9061ce67c398a8bf0a899ae9465de","original_commit_id":"5cd44b8aebc9061ce67c398a8bf0a899ae9465de","user":{"login":"LuxoftAKutsan","id":11158563,"avatar_url":"https://avatars.githubusercontent.com/u/11158563?v=3","gravatar_id":"","url":"https://api.github.com/users/LuxoftAKutsan","html_url":"https://github.com/LuxoftAKutsan","followers_url":"https://api.github.com/users/LuxoftAKutsan/followers","following_url":"https://api.github.com/users/LuxoftAKutsan/following{/other_user}","gists_url":"https://api.github.com/users/LuxoftAKutsan/gists{/gist_id}","starred_url":"https://api.github.com/users/LuxoftAKutsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuxoftAKutsan/subscriptions","organizations_url":"https://api.github.com/users/LuxoftAKutsan/orgs","repos_url":"https://api.github.com/users/LuxoftAKutsan/repos","events_url":"https://api.github.com/users/LuxoftAKutsan/events{/privacy}","received_events_url":"https://api.github.com/users/LuxoftAKutsan/received_events","type":"User","site_admin":false},"body":"@AGritsevich  who is responsible for deleting this pointer? ","created_at":"2016-03-23T09:38:43Z","updated_at":"2016-03-23T09:38:43Z","html_url":"https://github.com/smartdevicelink/sdl_core/pull/426#discussion_r57130833","pull_request_url":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/426","_links":{"self":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/comments/57130833"},"html":{"href":"https://github.com/smartdevicelink/sdl_core/pull/426#discussion_r57130833"},"pull_request":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/426"}}},"pull_request":{"url":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/426","id":63747514,"html_url":"https://github.com/smartdevicelink/sdl_core/pull/426","diff_url":"https://github.com/smartdevicelink/sdl_core/pull/426.diff","patch_url":"https://github.com/smartdevicelink/sdl_core/pull/426.patch","issue_url":"https://api.github.com/repos/smartdevicelink/sdl_core/issues/426","number":426,"state":"open","locked":false,"title":"Re-implement old threads timer with new interface","user":{"login":"AGritsevich","id":13793836,"avatar_url":"https://avatars.githubusercontent.com/u/13793836?v=3","gravatar_id":"","url":"https://api.github.com/users/AGritsevich","html_url":"https://github.com/AGritsevich","followers_url":"https://api.github.com/users/AGritsevich/followers","following_url":"https://api.github.com/users/AGritsevich/following{/other_user}","gists_url":"https://api.github.com/users/AGritsevich/gists{/gist_id}","starred_url":"https://api.github.com/users/AGritsevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AGritsevich/subscriptions","organizations_url":"https://api.github.com/users/AGritsevich/orgs","repos_url":"https://api.github.com/users/AGritsevich/repos","events_url":"https://api.github.com/users/AGritsevich/events{/privacy}","received_events_url":"https://api.github.com/users/AGritsevich/received_events","type":"User","site_admin":false},"body":"Merged thread-timer with new interface\r\n\r\nPlease review @malirod, @LuxoftAKutsan.","created_at":"2016-03-22T16:13:58Z","updated_at":"2016-03-23T09:38:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bde47ca2d8653b900140778c2416d8e80cfbe4ac","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/426/commits","review_comments_url":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/426/comments","review_comment_url":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smartdevicelink/sdl_core/issues/426/comments","statuses_url":"https://api.github.com/repos/smartdevicelink/sdl_core/statuses/5cd44b8aebc9061ce67c398a8bf0a899ae9465de","head":{"label":"AGritsevich:feature/Re-Implement_Timer_on_threads","ref":"feature/Re-Implement_Timer_on_threads","sha":"5cd44b8aebc9061ce67c398a8bf0a899ae9465de","user":{"login":"AGritsevich","id":13793836,"avatar_url":"https://avatars.githubusercontent.com/u/13793836?v=3","gravatar_id":"","url":"https://api.github.com/users/AGritsevich","html_url":"https://github.com/AGritsevich","followers_url":"https://api.github.com/users/AGritsevich/followers","following_url":"https://api.github.com/users/AGritsevich/following{/other_user}","gists_url":"https://api.github.com/users/AGritsevich/gists{/gist_id}","starred_url":"https://api.github.com/users/AGritsevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AGritsevich/subscriptions","organizations_url":"https://api.github.com/users/AGritsevich/orgs","repos_url":"https://api.github.com/users/AGritsevich/repos","events_url":"https://api.github.com/users/AGritsevich/events{/privacy}","received_events_url":"https://api.github.com/users/AGritsevich/received_events","type":"User","site_admin":false},"repo":{"id":54191219,"name":"sdl_core","full_name":"AGritsevich/sdl_core","owner":{"login":"AGritsevich","id":13793836,"avatar_url":"https://avatars.githubusercontent.com/u/13793836?v=3","gravatar_id":"","url":"https://api.github.com/users/AGritsevich","html_url":"https://github.com/AGritsevich","followers_url":"https://api.github.com/users/AGritsevich/followers","following_url":"https://api.github.com/users/AGritsevich/following{/other_user}","gists_url":"https://api.github.com/users/AGritsevich/gists{/gist_id}","starred_url":"https://api.github.com/users/AGritsevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AGritsevich/subscriptions","organizations_url":"https://api.github.com/users/AGritsevich/orgs","repos_url":"https://api.github.com/users/AGritsevich/repos","events_url":"https://api.github.com/users/AGritsevich/events{/privacy}","received_events_url":"https://api.github.com/users/AGritsevich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AGritsevich/sdl_core","description":"SmartDeviceLink In-Vehicle Software and Sample HMI","fork":true,"url":"https://api.github.com/repos/AGritsevich/sdl_core","forks_url":"https://api.github.com/repos/AGritsevich/sdl_core/forks","keys_url":"https://api.github.com/repos/AGritsevich/sdl_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AGritsevich/sdl_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AGritsevich/sdl_core/teams","hooks_url":"https://api.github.com/repos/AGritsevich/sdl_core/hooks","issue_events_url":"https://api.github.com/repos/AGritsevich/sdl_core/issues/events{/number}","events_url":"https://api.github.com/repos/AGritsevich/sdl_core/events","assignees_url":"https://api.github.com/repos/AGritsevich/sdl_core/assignees{/user}","branches_url":"https://api.github.com/repos/AGritsevich/sdl_core/branches{/branch}","tags_url":"https://api.github.com/repos/AGritsevich/sdl_core/tags","blobs_url":"https://api.github.com/repos/AGritsevich/sdl_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AGritsevich/sdl_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AGritsevich/sdl_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/AGritsevich/sdl_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AGritsevich/sdl_core/statuses/{sha}","languages_url":"https://api.github.com/repos/AGritsevich/sdl_core/languages","stargazers_url":"https://api.github.com/repos/AGritsevich/sdl_core/stargazers","contributors_url":"https://api.github.com/repos/AGritsevich/sdl_core/contributors","subscribers_url":"https://api.github.com/repos/AGritsevich/sdl_core/subscribers","subscription_url":"https://api.github.com/repos/AGritsevich/sdl_core/subscription","commits_url":"https://api.github.com/repos/AGritsevich/sdl_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/AGritsevich/sdl_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/AGritsevich/sdl_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/AGritsevich/sdl_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/AGritsevich/sdl_core/contents/{+path}","compare_url":"https://api.github.com/repos/AGritsevich/sdl_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AGritsevich/sdl_core/merges","archive_url":"https://api.github.com/repos/AGritsevich/sdl_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AGritsevich/sdl_core/downloads","issues_url":"https://api.github.com/repos/AGritsevich/sdl_core/issues{/number}","pulls_url":"https://api.github.com/repos/AGritsevich/sdl_core/pulls{/number}","milestones_url":"https://api.github.com/repos/AGritsevich/sdl_core/milestones{/number}","notifications_url":"https://api.github.com/repos/AGritsevich/sdl_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AGritsevich/sdl_core/labels{/name}","releases_url":"https://api.github.com/repos/AGritsevich/sdl_core/releases{/id}","deployments_url":"https://api.github.com/repos/AGritsevich/sdl_core/deployments","created_at":"2016-03-18T09:53:04Z","updated_at":"2016-03-18T09:53:12Z","pushed_at":"2016-03-23T07:00:32Z","git_url":"git://github.com/AGritsevich/sdl_core.git","ssh_url":"git@github.com:AGritsevich/sdl_core.git","clone_url":"https://github.com/AGritsevich/sdl_core.git","svn_url":"https://github.com/AGritsevich/sdl_core","homepage":"","size":168137,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"smartdevicelink:develop","ref":"develop","sha":"e84d3b5048e653c466f9daef301cb77578651d13","user":{"login":"smartdevicelink","id":8671397,"avatar_url":"https://avatars.githubusercontent.com/u/8671397?v=3","gravatar_id":"","url":"https://api.github.com/users/smartdevicelink","html_url":"https://github.com/smartdevicelink","followers_url":"https://api.github.com/users/smartdevicelink/followers","following_url":"https://api.github.com/users/smartdevicelink/following{/other_user}","gists_url":"https://api.github.com/users/smartdevicelink/gists{/gist_id}","starred_url":"https://api.github.com/users/smartdevicelink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartdevicelink/subscriptions","organizations_url":"https://api.github.com/users/smartdevicelink/orgs","repos_url":"https://api.github.com/users/smartdevicelink/repos","events_url":"https://api.github.com/users/smartdevicelink/events{/privacy}","received_events_url":"https://api.github.com/users/smartdevicelink/received_events","type":"Organization","site_admin":false},"repo":{"id":24724170,"name":"sdl_core","full_name":"smartdevicelink/sdl_core","owner":{"login":"smartdevicelink","id":8671397,"avatar_url":"https://avatars.githubusercontent.com/u/8671397?v=3","gravatar_id":"","url":"https://api.github.com/users/smartdevicelink","html_url":"https://github.com/smartdevicelink","followers_url":"https://api.github.com/users/smartdevicelink/followers","following_url":"https://api.github.com/users/smartdevicelink/following{/other_user}","gists_url":"https://api.github.com/users/smartdevicelink/gists{/gist_id}","starred_url":"https://api.github.com/users/smartdevicelink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartdevicelink/subscriptions","organizations_url":"https://api.github.com/users/smartdevicelink/orgs","repos_url":"https://api.github.com/users/smartdevicelink/repos","events_url":"https://api.github.com/users/smartdevicelink/events{/privacy}","received_events_url":"https://api.github.com/users/smartdevicelink/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smartdevicelink/sdl_core","description":"SmartDeviceLink In-Vehicle Software and Sample HMI","fork":false,"url":"https://api.github.com/repos/smartdevicelink/sdl_core","forks_url":"https://api.github.com/repos/smartdevicelink/sdl_core/forks","keys_url":"https://api.github.com/repos/smartdevicelink/sdl_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smartdevicelink/sdl_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smartdevicelink/sdl_core/teams","hooks_url":"https://api.github.com/repos/smartdevicelink/sdl_core/hooks","issue_events_url":"https://api.github.com/repos/smartdevicelink/sdl_core/issues/events{/number}","events_url":"https://api.github.com/repos/smartdevicelink/sdl_core/events","assignees_url":"https://api.github.com/repos/smartdevicelink/sdl_core/assignees{/user}","branches_url":"https://api.github.com/repos/smartdevicelink/sdl_core/branches{/branch}","tags_url":"https://api.github.com/repos/smartdevicelink/sdl_core/tags","blobs_url":"https://api.github.com/repos/smartdevicelink/sdl_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smartdevicelink/sdl_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smartdevicelink/sdl_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/smartdevicelink/sdl_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smartdevicelink/sdl_core/statuses/{sha}","languages_url":"https://api.github.com/repos/smartdevicelink/sdl_core/languages","stargazers_url":"https://api.github.com/repos/smartdevicelink/sdl_core/stargazers","contributors_url":"https://api.github.com/repos/smartdevicelink/sdl_core/contributors","subscribers_url":"https://api.github.com/repos/smartdevicelink/sdl_core/subscribers","subscription_url":"https://api.github.com/repos/smartdevicelink/sdl_core/subscription","commits_url":"https://api.github.com/repos/smartdevicelink/sdl_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/smartdevicelink/sdl_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/smartdevicelink/sdl_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/smartdevicelink/sdl_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/smartdevicelink/sdl_core/contents/{+path}","compare_url":"https://api.github.com/repos/smartdevicelink/sdl_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smartdevicelink/sdl_core/merges","archive_url":"https://api.github.com/repos/smartdevicelink/sdl_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smartdevicelink/sdl_core/downloads","issues_url":"https://api.github.com/repos/smartdevicelink/sdl_core/issues{/number}","pulls_url":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls{/number}","milestones_url":"https://api.github.com/repos/smartdevicelink/sdl_core/milestones{/number}","notifications_url":"https://api.github.com/repos/smartdevicelink/sdl_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smartdevicelink/sdl_core/labels{/name}","releases_url":"https://api.github.com/repos/smartdevicelink/sdl_core/releases{/id}","deployments_url":"https://api.github.com/repos/smartdevicelink/sdl_core/deployments","created_at":"2014-10-02T15:16:26Z","updated_at":"2016-03-21T15:37:27Z","pushed_at":"2016-03-23T08:43:01Z","git_url":"git://github.com/smartdevicelink/sdl_core.git","ssh_url":"git@github.com:smartdevicelink/sdl_core.git","clone_url":"https://github.com/smartdevicelink/sdl_core.git","svn_url":"https://github.com/smartdevicelink/sdl_core","homepage":"","size":301742,"stargazers_count":61,"watchers_count":61,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":60,"forks":61,"open_issues":60,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/426"},"html":{"href":"https://github.com/smartdevicelink/sdl_core/pull/426"},"issue":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/issues/426"},"comments":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/issues/426/comments"},"review_comments":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/426/comments"},"review_comment":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/pulls/426/commits"},"statuses":{"href":"https://api.github.com/repos/smartdevicelink/sdl_core/statuses/5cd44b8aebc9061ce67c398a8bf0a899ae9465de"}}}}