{"action":"created","comment":{"url":"https://api.github.com/repos/arvidn/libtorrent/pulls/comments/81126383","pull_request_review_id":2128695,"id":81126383,"diff_hunk":"@@ -473,13 +477,17 @@ namespace\n \n \t\t\tif (0 == m_settings.item_lifetime) return;\n \n+\t\t\tstatic auto const stime = system_clock::now();\n+\t\t\tstatic auto const ctime = aux::time_now();\n+\n+\t\t\tauto const now = stime + (aux::time_now() - ctime);\n \t\t\ttime_duration lifetime = seconds(m_settings.item_lifetime);\n \t\t\t// item lifetime must >= 120 minutes.\n \t\t\tif (lifetime < minutes(120)) lifetime = minutes(120);\n \n \t\t\tfor (auto i = m_immutable_table.begin(); i != m_immutable_table.end();)\n \t\t\t{\n-\t\t\t\tif (i->second.last_seen + lifetime > now)\n+\t\t\t\tif (system_clock::from_time_t(i->second.last_seen) + lifetime > now)","path":"src/kademlia/dht_storage.cpp","position":116,"original_position":128,"commit_id":"60c4e0e80d2063f25f1d00942849b2d1bbba76ba","original_commit_id":"8b4d6c8124aa54b493c86832230454455b7a9289","user":{"login":"aldenml","id":143813,"avatar_url":"https://avatars.githubusercontent.com/u/143813?v=3","gravatar_id":"","url":"https://api.github.com/users/aldenml","html_url":"https://github.com/aldenml","followers_url":"https://api.github.com/users/aldenml/followers","following_url":"https://api.github.com/users/aldenml/following{/other_user}","gists_url":"https://api.github.com/users/aldenml/gists{/gist_id}","starred_url":"https://api.github.com/users/aldenml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldenml/subscriptions","organizations_url":"https://api.github.com/users/aldenml/orgs","repos_url":"https://api.github.com/users/aldenml/repos","events_url":"https://api.github.com/users/aldenml/events{/privacy}","received_events_url":"https://api.github.com/users/aldenml/received_events","type":"User","site_admin":false},"body":"I can change the type to `system_clock::time_point`, but because of the simulation, I need to work with a `system_clock` start point as a reference and offset with the `steady_clock`. Am I wrong?","created_at":"2016-09-29T12:42:14Z","updated_at":"2016-09-29T12:42:14Z","html_url":"https://github.com/arvidn/libtorrent/pull/1166#discussion_r81126383","pull_request_url":"https://api.github.com/repos/arvidn/libtorrent/pulls/1166","_links":{"self":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/comments/81126383"},"html":{"href":"https://github.com/arvidn/libtorrent/pull/1166#discussion_r81126383"},"pull_request":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/1166"}}},"pull_request":{"url":"https://api.github.com/repos/arvidn/libtorrent/pulls/1166","id":87187736,"html_url":"https://github.com/arvidn/libtorrent/pull/1166","diff_url":"https://github.com/arvidn/libtorrent/pull/1166.diff","patch_url":"https://github.com/arvidn/libtorrent/pull/1166.patch","issue_url":"https://api.github.com/repos/arvidn/libtorrent/issues/1166","number":1166,"state":"open","locked":false,"title":"refactor of dht_default_storage structures","user":{"login":"aldenml","id":143813,"avatar_url":"https://avatars.githubusercontent.com/u/143813?v=3","gravatar_id":"","url":"https://api.github.com/users/aldenml","html_url":"https://github.com/aldenml","followers_url":"https://api.github.com/users/aldenml/followers","following_url":"https://api.github.com/users/aldenml/following{/other_user}","gists_url":"https://api.github.com/users/aldenml/gists{/gist_id}","starred_url":"https://api.github.com/users/aldenml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldenml/subscriptions","organizations_url":"https://api.github.com/users/aldenml/orgs","repos_url":"https://api.github.com/users/aldenml/repos","events_url":"https://api.github.com/users/aldenml/events{/privacy}","received_events_url":"https://api.github.com/users/aldenml/received_events","type":"User","site_admin":false},"body":"The context of this is accommodating the source code for upcoming changes.","created_at":"2016-09-28T19:48:19Z","updated_at":"2016-09-29T12:42:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab36e88d368ea91f3cb59c5d63991d7df8fdfb17","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/arvidn/libtorrent/pulls/1166/commits","review_comments_url":"https://api.github.com/repos/arvidn/libtorrent/pulls/1166/comments","review_comment_url":"https://api.github.com/repos/arvidn/libtorrent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/issues/1166/comments","statuses_url":"https://api.github.com/repos/arvidn/libtorrent/statuses/60c4e0e80d2063f25f1d00942849b2d1bbba76ba","head":{"label":"aldenml:dht-items-data-refactor-1.2","ref":"dht-items-data-refactor-1.2","sha":"60c4e0e80d2063f25f1d00942849b2d1bbba76ba","user":{"login":"aldenml","id":143813,"avatar_url":"https://avatars.githubusercontent.com/u/143813?v=3","gravatar_id":"","url":"https://api.github.com/users/aldenml","html_url":"https://github.com/aldenml","followers_url":"https://api.github.com/users/aldenml/followers","following_url":"https://api.github.com/users/aldenml/following{/other_user}","gists_url":"https://api.github.com/users/aldenml/gists{/gist_id}","starred_url":"https://api.github.com/users/aldenml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldenml/subscriptions","organizations_url":"https://api.github.com/users/aldenml/orgs","repos_url":"https://api.github.com/users/aldenml/repos","events_url":"https://api.github.com/users/aldenml/events{/privacy}","received_events_url":"https://api.github.com/users/aldenml/received_events","type":"User","site_admin":false},"repo":{"id":37677407,"name":"libtorrent","full_name":"aldenml/libtorrent","owner":{"login":"aldenml","id":143813,"avatar_url":"https://avatars.githubusercontent.com/u/143813?v=3","gravatar_id":"","url":"https://api.github.com/users/aldenml","html_url":"https://github.com/aldenml","followers_url":"https://api.github.com/users/aldenml/followers","following_url":"https://api.github.com/users/aldenml/following{/other_user}","gists_url":"https://api.github.com/users/aldenml/gists{/gist_id}","starred_url":"https://api.github.com/users/aldenml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldenml/subscriptions","organizations_url":"https://api.github.com/users/aldenml/orgs","repos_url":"https://api.github.com/users/aldenml/repos","events_url":"https://api.github.com/users/aldenml/events{/privacy}","received_events_url":"https://api.github.com/users/aldenml/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aldenml/libtorrent","description":"an efficient feature complete C++ bittorrent implementation","fork":true,"url":"https://api.github.com/repos/aldenml/libtorrent","forks_url":"https://api.github.com/repos/aldenml/libtorrent/forks","keys_url":"https://api.github.com/repos/aldenml/libtorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aldenml/libtorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aldenml/libtorrent/teams","hooks_url":"https://api.github.com/repos/aldenml/libtorrent/hooks","issue_events_url":"https://api.github.com/repos/aldenml/libtorrent/issues/events{/number}","events_url":"https://api.github.com/repos/aldenml/libtorrent/events","assignees_url":"https://api.github.com/repos/aldenml/libtorrent/assignees{/user}","branches_url":"https://api.github.com/repos/aldenml/libtorrent/branches{/branch}","tags_url":"https://api.github.com/repos/aldenml/libtorrent/tags","blobs_url":"https://api.github.com/repos/aldenml/libtorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aldenml/libtorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aldenml/libtorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/aldenml/libtorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aldenml/libtorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/aldenml/libtorrent/languages","stargazers_url":"https://api.github.com/repos/aldenml/libtorrent/stargazers","contributors_url":"https://api.github.com/repos/aldenml/libtorrent/contributors","subscribers_url":"https://api.github.com/repos/aldenml/libtorrent/subscribers","subscription_url":"https://api.github.com/repos/aldenml/libtorrent/subscription","commits_url":"https://api.github.com/repos/aldenml/libtorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/aldenml/libtorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/aldenml/libtorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/aldenml/libtorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/aldenml/libtorrent/contents/{+path}","compare_url":"https://api.github.com/repos/aldenml/libtorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aldenml/libtorrent/merges","archive_url":"https://api.github.com/repos/aldenml/libtorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aldenml/libtorrent/downloads","issues_url":"https://api.github.com/repos/aldenml/libtorrent/issues{/number}","pulls_url":"https://api.github.com/repos/aldenml/libtorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/aldenml/libtorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/aldenml/libtorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aldenml/libtorrent/labels{/name}","releases_url":"https://api.github.com/repos/aldenml/libtorrent/releases{/id}","deployments_url":"https://api.github.com/repos/aldenml/libtorrent/deployments","created_at":"2015-06-18T18:31:58Z","updated_at":"2016-01-11T13:58:25Z","pushed_at":"2016-09-29T12:31:18Z","git_url":"git://github.com/aldenml/libtorrent.git","ssh_url":"git@github.com:aldenml/libtorrent.git","clone_url":"https://github.com/aldenml/libtorrent.git","svn_url":"https://github.com/aldenml/libtorrent","homepage":"http://libtorrent.org","size":42031,"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":"arvidn:master","ref":"master","sha":"af92e91a90b0fa8b9ddd892dce3c402847fa1a9e","user":{"login":"arvidn","id":661450,"avatar_url":"https://avatars.githubusercontent.com/u/661450?v=3","gravatar_id":"","url":"https://api.github.com/users/arvidn","html_url":"https://github.com/arvidn","followers_url":"https://api.github.com/users/arvidn/followers","following_url":"https://api.github.com/users/arvidn/following{/other_user}","gists_url":"https://api.github.com/users/arvidn/gists{/gist_id}","starred_url":"https://api.github.com/users/arvidn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvidn/subscriptions","organizations_url":"https://api.github.com/users/arvidn/orgs","repos_url":"https://api.github.com/users/arvidn/repos","events_url":"https://api.github.com/users/arvidn/events{/privacy}","received_events_url":"https://api.github.com/users/arvidn/received_events","type":"User","site_admin":false},"repo":{"id":36781769,"name":"libtorrent","full_name":"arvidn/libtorrent","owner":{"login":"arvidn","id":661450,"avatar_url":"https://avatars.githubusercontent.com/u/661450?v=3","gravatar_id":"","url":"https://api.github.com/users/arvidn","html_url":"https://github.com/arvidn","followers_url":"https://api.github.com/users/arvidn/followers","following_url":"https://api.github.com/users/arvidn/following{/other_user}","gists_url":"https://api.github.com/users/arvidn/gists{/gist_id}","starred_url":"https://api.github.com/users/arvidn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvidn/subscriptions","organizations_url":"https://api.github.com/users/arvidn/orgs","repos_url":"https://api.github.com/users/arvidn/repos","events_url":"https://api.github.com/users/arvidn/events{/privacy}","received_events_url":"https://api.github.com/users/arvidn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arvidn/libtorrent","description":"an efficient feature complete C++ bittorrent implementation","fork":false,"url":"https://api.github.com/repos/arvidn/libtorrent","forks_url":"https://api.github.com/repos/arvidn/libtorrent/forks","keys_url":"https://api.github.com/repos/arvidn/libtorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arvidn/libtorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arvidn/libtorrent/teams","hooks_url":"https://api.github.com/repos/arvidn/libtorrent/hooks","issue_events_url":"https://api.github.com/repos/arvidn/libtorrent/issues/events{/number}","events_url":"https://api.github.com/repos/arvidn/libtorrent/events","assignees_url":"https://api.github.com/repos/arvidn/libtorrent/assignees{/user}","branches_url":"https://api.github.com/repos/arvidn/libtorrent/branches{/branch}","tags_url":"https://api.github.com/repos/arvidn/libtorrent/tags","blobs_url":"https://api.github.com/repos/arvidn/libtorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arvidn/libtorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arvidn/libtorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/arvidn/libtorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arvidn/libtorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/arvidn/libtorrent/languages","stargazers_url":"https://api.github.com/repos/arvidn/libtorrent/stargazers","contributors_url":"https://api.github.com/repos/arvidn/libtorrent/contributors","subscribers_url":"https://api.github.com/repos/arvidn/libtorrent/subscribers","subscription_url":"https://api.github.com/repos/arvidn/libtorrent/subscription","commits_url":"https://api.github.com/repos/arvidn/libtorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/arvidn/libtorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/arvidn/libtorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/arvidn/libtorrent/contents/{+path}","compare_url":"https://api.github.com/repos/arvidn/libtorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arvidn/libtorrent/merges","archive_url":"https://api.github.com/repos/arvidn/libtorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arvidn/libtorrent/downloads","issues_url":"https://api.github.com/repos/arvidn/libtorrent/issues{/number}","pulls_url":"https://api.github.com/repos/arvidn/libtorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/arvidn/libtorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/arvidn/libtorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arvidn/libtorrent/labels{/name}","releases_url":"https://api.github.com/repos/arvidn/libtorrent/releases{/id}","deployments_url":"https://api.github.com/repos/arvidn/libtorrent/deployments","created_at":"2015-06-03T05:22:03Z","updated_at":"2016-09-28T08:14:27Z","pushed_at":"2016-09-29T12:31:18Z","git_url":"git://github.com/arvidn/libtorrent.git","ssh_url":"git@github.com:arvidn/libtorrent.git","clone_url":"https://github.com/arvidn/libtorrent.git","svn_url":"https://github.com/arvidn/libtorrent","homepage":"http://libtorrent.org","size":74467,"stargazers_count":536,"watchers_count":536,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":174,"mirror_url":null,"open_issues_count":75,"forks":174,"open_issues":75,"watchers":536,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/1166"},"html":{"href":"https://github.com/arvidn/libtorrent/pull/1166"},"issue":{"href":"https://api.github.com/repos/arvidn/libtorrent/issues/1166"},"comments":{"href":"https://api.github.com/repos/arvidn/libtorrent/issues/1166/comments"},"review_comments":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/1166/comments"},"review_comment":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/1166/commits"},"statuses":{"href":"https://api.github.com/repos/arvidn/libtorrent/statuses/60c4e0e80d2063f25f1d00942849b2d1bbba76ba"}}}}
{"actor":{"display_login":"aldenml"}}