{"action":"created","comment":{"url":"https://api.github.com/repos/llllllllll/slider/pulls/comments/126291504","pull_request_review_id":48765385,"id":126291504,"diff_hunk":"@@ -134,19 +137,24 @@ def _consume_actions(buffer):\n     decompressed_data = lzma.decompress(compressed_data)\n \n     out = []\n+    abs_offset = 0\n     for raw_action in decompressed_data.split(b','):\n         if not raw_action:\n             continue\n-        offset, x, y, raw_action_mask = raw_action.split(b'|')\n+        raw_offset, x, y, raw_action_mask = raw_action.split(b'|')\n         action_mask = ActionBitMask.unpack(int(raw_action_mask))\n+        rel_offset = int(raw_offset)\n+        abs_offset += rel_offset\n         out.append(Action(\n-            datetime.timedelta(milliseconds=int(offset)),\n+            datetime.timedelta(milliseconds=rel_offset),","path":"slider/replay.py","position":39,"original_position":39,"commit_id":"03059aa067ec97ac60db7500552a1945baf96bdd","original_commit_id":"03059aa067ec97ac60db7500552a1945baf96bdd","user":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars0.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"body":"a timedelta64 can be converted into seconds, or ms by viewing it as an int, for example:\r\n```python\r\n>>> delta = np.timedelta64(100, 'ms')\r\n>>> delta.view('int64')\r\n100\r\n```","created_at":"2017-07-08T22:31:06Z","updated_at":"2017-07-08T22:31:06Z","html_url":"https://github.com/llllllllll/slider/pull/4#discussion_r126291504","pull_request_url":"https://api.github.com/repos/llllllllll/slider/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/llllllllll/slider/pulls/comments/126291504"},"html":{"href":"https://github.com/llllllllll/slider/pull/4#discussion_r126291504"},"pull_request":{"href":"https://api.github.com/repos/llllllllll/slider/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/llllllllll/slider/pulls/4","id":129524967,"html_url":"https://github.com/llllllllll/slider/pull/4","diff_url":"https://github.com/llllllllll/slider/pull/4.diff","patch_url":"https://github.com/llllllllll/slider/pull/4.patch","issue_url":"https://api.github.com/repos/llllllllll/slider/issues/4","number":4,"state":"open","locked":false,"title":"Absolute offset in replay actions","user":{"login":"blimmo","id":26982890,"avatar_url":"https://avatars3.githubusercontent.com/u/26982890?v=3","gravatar_id":"","url":"https://api.github.com/users/blimmo","html_url":"https://github.com/blimmo","followers_url":"https://api.github.com/users/blimmo/followers","following_url":"https://api.github.com/users/blimmo/following{/other_user}","gists_url":"https://api.github.com/users/blimmo/gists{/gist_id}","starred_url":"https://api.github.com/users/blimmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blimmo/subscriptions","organizations_url":"https://api.github.com/users/blimmo/orgs","repos_url":"https://api.github.com/users/blimmo/repos","events_url":"https://api.github.com/users/blimmo/events{/privacy}","received_events_url":"https://api.github.com/users/blimmo/received_events","type":"User","site_admin":false},"body":"I needed the cumulative offset for each Action in the replay and thought it was probably a fairly common requirement.\r\n\r\nI also fixed a bug where the actions weren't even being added to the replay because the function wasn't returning.\r\n\r\nNot sure about the names though, they were the best I could come up with. Also isn't backwards compatible but since the actions weren't even being added to the replay I think we can probably assume no one was using them XD.","created_at":"2017-07-08T10:37:20Z","updated_at":"2017-07-08T22:31:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c67e09e44930afd3273fd330c4b7e9954159d152","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/llllllllll/slider/pulls/4/commits","review_comments_url":"https://api.github.com/repos/llllllllll/slider/pulls/4/comments","review_comment_url":"https://api.github.com/repos/llllllllll/slider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/llllllllll/slider/issues/4/comments","statuses_url":"https://api.github.com/repos/llllllllll/slider/statuses/03059aa067ec97ac60db7500552a1945baf96bdd","head":{"label":"blimmo:replay-abs-offset-clean","ref":"replay-abs-offset-clean","sha":"03059aa067ec97ac60db7500552a1945baf96bdd","user":{"login":"blimmo","id":26982890,"avatar_url":"https://avatars3.githubusercontent.com/u/26982890?v=3","gravatar_id":"","url":"https://api.github.com/users/blimmo","html_url":"https://github.com/blimmo","followers_url":"https://api.github.com/users/blimmo/followers","following_url":"https://api.github.com/users/blimmo/following{/other_user}","gists_url":"https://api.github.com/users/blimmo/gists{/gist_id}","starred_url":"https://api.github.com/users/blimmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blimmo/subscriptions","organizations_url":"https://api.github.com/users/blimmo/orgs","repos_url":"https://api.github.com/users/blimmo/repos","events_url":"https://api.github.com/users/blimmo/events{/privacy}","received_events_url":"https://api.github.com/users/blimmo/received_events","type":"User","site_admin":false},"repo":{"id":94028183,"name":"slider","full_name":"blimmo/slider","owner":{"login":"blimmo","id":26982890,"avatar_url":"https://avatars3.githubusercontent.com/u/26982890?v=3","gravatar_id":"","url":"https://api.github.com/users/blimmo","html_url":"https://github.com/blimmo","followers_url":"https://api.github.com/users/blimmo/followers","following_url":"https://api.github.com/users/blimmo/following{/other_user}","gists_url":"https://api.github.com/users/blimmo/gists{/gist_id}","starred_url":"https://api.github.com/users/blimmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blimmo/subscriptions","organizations_url":"https://api.github.com/users/blimmo/orgs","repos_url":"https://api.github.com/users/blimmo/repos","events_url":"https://api.github.com/users/blimmo/events{/privacy}","received_events_url":"https://api.github.com/users/blimmo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blimmo/slider","description":"Utilities for working with osu! files and data","fork":true,"url":"https://api.github.com/repos/blimmo/slider","forks_url":"https://api.github.com/repos/blimmo/slider/forks","keys_url":"https://api.github.com/repos/blimmo/slider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blimmo/slider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blimmo/slider/teams","hooks_url":"https://api.github.com/repos/blimmo/slider/hooks","issue_events_url":"https://api.github.com/repos/blimmo/slider/issues/events{/number}","events_url":"https://api.github.com/repos/blimmo/slider/events","assignees_url":"https://api.github.com/repos/blimmo/slider/assignees{/user}","branches_url":"https://api.github.com/repos/blimmo/slider/branches{/branch}","tags_url":"https://api.github.com/repos/blimmo/slider/tags","blobs_url":"https://api.github.com/repos/blimmo/slider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blimmo/slider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blimmo/slider/git/refs{/sha}","trees_url":"https://api.github.com/repos/blimmo/slider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blimmo/slider/statuses/{sha}","languages_url":"https://api.github.com/repos/blimmo/slider/languages","stargazers_url":"https://api.github.com/repos/blimmo/slider/stargazers","contributors_url":"https://api.github.com/repos/blimmo/slider/contributors","subscribers_url":"https://api.github.com/repos/blimmo/slider/subscribers","subscription_url":"https://api.github.com/repos/blimmo/slider/subscription","commits_url":"https://api.github.com/repos/blimmo/slider/commits{/sha}","git_commits_url":"https://api.github.com/repos/blimmo/slider/git/commits{/sha}","comments_url":"https://api.github.com/repos/blimmo/slider/comments{/number}","issue_comment_url":"https://api.github.com/repos/blimmo/slider/issues/comments{/number}","contents_url":"https://api.github.com/repos/blimmo/slider/contents/{+path}","compare_url":"https://api.github.com/repos/blimmo/slider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blimmo/slider/merges","archive_url":"https://api.github.com/repos/blimmo/slider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blimmo/slider/downloads","issues_url":"https://api.github.com/repos/blimmo/slider/issues{/number}","pulls_url":"https://api.github.com/repos/blimmo/slider/pulls{/number}","milestones_url":"https://api.github.com/repos/blimmo/slider/milestones{/number}","notifications_url":"https://api.github.com/repos/blimmo/slider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blimmo/slider/labels{/name}","releases_url":"https://api.github.com/repos/blimmo/slider/releases{/id}","deployments_url":"https://api.github.com/repos/blimmo/slider/deployments","created_at":"2017-06-11T19:52:08Z","updated_at":"2017-06-11T19:52:10Z","pushed_at":"2017-07-08T10:39:14Z","git_url":"git://github.com/blimmo/slider.git","ssh_url":"git@github.com:blimmo/slider.git","clone_url":"https://github.com/blimmo/slider.git","svn_url":"https://github.com/blimmo/slider","homepage":"https://llllllllll.github.io/slider/index.html","size":5859,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"llllllllll:master","ref":"master","sha":"ad45399d1c20e804d0ad3afe5a9360b3631052aa","user":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars0.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"repo":{"id":88325531,"name":"slider","full_name":"llllllllll/slider","owner":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars0.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/llllllllll/slider","description":"Utilities for working with osu! files and data","fork":false,"url":"https://api.github.com/repos/llllllllll/slider","forks_url":"https://api.github.com/repos/llllllllll/slider/forks","keys_url":"https://api.github.com/repos/llllllllll/slider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/llllllllll/slider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/llllllllll/slider/teams","hooks_url":"https://api.github.com/repos/llllllllll/slider/hooks","issue_events_url":"https://api.github.com/repos/llllllllll/slider/issues/events{/number}","events_url":"https://api.github.com/repos/llllllllll/slider/events","assignees_url":"https://api.github.com/repos/llllllllll/slider/assignees{/user}","branches_url":"https://api.github.com/repos/llllllllll/slider/branches{/branch}","tags_url":"https://api.github.com/repos/llllllllll/slider/tags","blobs_url":"https://api.github.com/repos/llllllllll/slider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/llllllllll/slider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/llllllllll/slider/git/refs{/sha}","trees_url":"https://api.github.com/repos/llllllllll/slider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/llllllllll/slider/statuses/{sha}","languages_url":"https://api.github.com/repos/llllllllll/slider/languages","stargazers_url":"https://api.github.com/repos/llllllllll/slider/stargazers","contributors_url":"https://api.github.com/repos/llllllllll/slider/contributors","subscribers_url":"https://api.github.com/repos/llllllllll/slider/subscribers","subscription_url":"https://api.github.com/repos/llllllllll/slider/subscription","commits_url":"https://api.github.com/repos/llllllllll/slider/commits{/sha}","git_commits_url":"https://api.github.com/repos/llllllllll/slider/git/commits{/sha}","comments_url":"https://api.github.com/repos/llllllllll/slider/comments{/number}","issue_comment_url":"https://api.github.com/repos/llllllllll/slider/issues/comments{/number}","contents_url":"https://api.github.com/repos/llllllllll/slider/contents/{+path}","compare_url":"https://api.github.com/repos/llllllllll/slider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/llllllllll/slider/merges","archive_url":"https://api.github.com/repos/llllllllll/slider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/llllllllll/slider/downloads","issues_url":"https://api.github.com/repos/llllllllll/slider/issues{/number}","pulls_url":"https://api.github.com/repos/llllllllll/slider/pulls{/number}","milestones_url":"https://api.github.com/repos/llllllllll/slider/milestones{/number}","notifications_url":"https://api.github.com/repos/llllllllll/slider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/llllllllll/slider/labels{/name}","releases_url":"https://api.github.com/repos/llllllllll/slider/releases{/id}","deployments_url":"https://api.github.com/repos/llllllllll/slider/deployments","created_at":"2017-04-15T05:11:17Z","updated_at":"2017-06-25T13:22:12Z","pushed_at":"2017-07-08T10:39:15Z","git_url":"git://github.com/llllllllll/slider.git","ssh_url":"git@github.com:llllllllll/slider.git","clone_url":"https://github.com/llllllllll/slider.git","svn_url":"https://github.com/llllllllll/slider","homepage":"https://llllllllll.github.io/slider/index.html","size":5812,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/llllllllll/slider/pulls/4"},"html":{"href":"https://github.com/llllllllll/slider/pull/4"},"issue":{"href":"https://api.github.com/repos/llllllllll/slider/issues/4"},"comments":{"href":"https://api.github.com/repos/llllllllll/slider/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/llllllllll/slider/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/llllllllll/slider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/llllllllll/slider/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/llllllllll/slider/statuses/03059aa067ec97ac60db7500552a1945baf96bdd"}}}}
{"actor":{"display_login":"llllllllll"}}