{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/util/pulls/comments/33375032","id":33375032,"diff_hunk":"@@ -195,19 +195,29 @@ trait TimeLike[This <: TimeLike[This]] extends Ordered[This] { self: This =>\n   /** The difference between the two `TimeLike`s */\n   def diff(that: This): Duration\n \n+  private[this] def round(f: (Long, Long) => Long, x: Duration): This = (this, x) match {","path":"util-core/src/main/scala/com/twitter/util/Time.scala","position":4,"original_position":4,"commit_id":"b19d341f07128ba9e7b2ea715aab75ea5254a798","original_commit_id":"b19d341f07128ba9e7b2ea715aab75ea5254a798","user":{"login":"mosesn","id":156562,"avatar_url":"https://avatars.githubusercontent.com/u/156562?v=3","gravatar_id":"","url":"https://api.github.com/users/mosesn","html_url":"https://github.com/mosesn","followers_url":"https://api.github.com/users/mosesn/followers","following_url":"https://api.github.com/users/mosesn/following{/other_user}","gists_url":"https://api.github.com/users/mosesn/gists{/gist_id}","starred_url":"https://api.github.com/users/mosesn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosesn/subscriptions","organizations_url":"https://api.github.com/users/mosesn/orgs","repos_url":"https://api.github.com/users/mosesn/repos","events_url":"https://api.github.com/users/mosesn/events{/privacy}","received_events_url":"https://api.github.com/users/mosesn/received_events","type":"User","site_admin":false},"body":"the names of these arguments should be more descriptive","created_at":"2015-06-26T17:09:15Z","updated_at":"2015-06-26T17:09:15Z","html_url":"https://github.com/twitter/util/pull/135#discussion_r33375032","pull_request_url":"https://api.github.com/repos/twitter/util/pulls/135","_links":{"self":{"href":"https://api.github.com/repos/twitter/util/pulls/comments/33375032"},"html":{"href":"https://github.com/twitter/util/pull/135#discussion_r33375032"},"pull_request":{"href":"https://api.github.com/repos/twitter/util/pulls/135"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/util/pulls/135","id":38645397,"html_url":"https://github.com/twitter/util/pull/135","diff_url":"https://github.com/twitter/util/pull/135.diff","patch_url":"https://github.com/twitter/util/pull/135.patch","issue_url":"https://api.github.com/repos/twitter/util/issues/135","number":135,"state":"open","locked":false,"title":"Add facility to round up to a duration in TimeLike","user":{"login":"benjumanji","id":290429,"avatar_url":"https://avatars.githubusercontent.com/u/290429?v=3","gravatar_id":"","url":"https://api.github.com/users/benjumanji","html_url":"https://github.com/benjumanji","followers_url":"https://api.github.com/users/benjumanji/followers","following_url":"https://api.github.com/users/benjumanji/following{/other_user}","gists_url":"https://api.github.com/users/benjumanji/gists{/gist_id}","starred_url":"https://api.github.com/users/benjumanji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjumanji/subscriptions","organizations_url":"https://api.github.com/users/benjumanji/orgs","repos_url":"https://api.github.com/users/benjumanji/repos","events_url":"https://api.github.com/users/benjumanji/events{/privacy}","received_events_url":"https://api.github.com/users/benjumanji/received_events","type":"User","site_admin":false},"body":"Problem\r\n\r\nNo rounding operation analgous to floor for rounding up to the closest\r\nmultiple of a duration. While less common than floor, ceiling is still\r\nuseful.\r\n\r\nSolution\r\n\r\nAdd a ceiling function to TimeLike.","created_at":"2015-06-26T12:42:45Z","updated_at":"2015-06-26T17:09:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1be9adc4e3bee6d34926290a2019a56cab63c1b8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twitter/util/pulls/135/commits","review_comments_url":"https://api.github.com/repos/twitter/util/pulls/135/comments","review_comment_url":"https://api.github.com/repos/twitter/util/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twitter/util/issues/135/comments","statuses_url":"https://api.github.com/repos/twitter/util/statuses/b19d341f07128ba9e7b2ea715aab75ea5254a798","head":{"label":"benjumanji:time-ceiling","ref":"time-ceiling","sha":"b19d341f07128ba9e7b2ea715aab75ea5254a798","user":{"login":"benjumanji","id":290429,"avatar_url":"https://avatars.githubusercontent.com/u/290429?v=3","gravatar_id":"","url":"https://api.github.com/users/benjumanji","html_url":"https://github.com/benjumanji","followers_url":"https://api.github.com/users/benjumanji/followers","following_url":"https://api.github.com/users/benjumanji/following{/other_user}","gists_url":"https://api.github.com/users/benjumanji/gists{/gist_id}","starred_url":"https://api.github.com/users/benjumanji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjumanji/subscriptions","organizations_url":"https://api.github.com/users/benjumanji/orgs","repos_url":"https://api.github.com/users/benjumanji/repos","events_url":"https://api.github.com/users/benjumanji/events{/privacy}","received_events_url":"https://api.github.com/users/benjumanji/received_events","type":"User","site_admin":false},"repo":{"id":38110309,"name":"util","full_name":"benjumanji/util","owner":{"login":"benjumanji","id":290429,"avatar_url":"https://avatars.githubusercontent.com/u/290429?v=3","gravatar_id":"","url":"https://api.github.com/users/benjumanji","html_url":"https://github.com/benjumanji","followers_url":"https://api.github.com/users/benjumanji/followers","following_url":"https://api.github.com/users/benjumanji/following{/other_user}","gists_url":"https://api.github.com/users/benjumanji/gists{/gist_id}","starred_url":"https://api.github.com/users/benjumanji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjumanji/subscriptions","organizations_url":"https://api.github.com/users/benjumanji/orgs","repos_url":"https://api.github.com/users/benjumanji/repos","events_url":"https://api.github.com/users/benjumanji/events{/privacy}","received_events_url":"https://api.github.com/users/benjumanji/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benjumanji/util","description":"Wonderful reusable code from Twitter","fork":true,"url":"https://api.github.com/repos/benjumanji/util","forks_url":"https://api.github.com/repos/benjumanji/util/forks","keys_url":"https://api.github.com/repos/benjumanji/util/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benjumanji/util/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benjumanji/util/teams","hooks_url":"https://api.github.com/repos/benjumanji/util/hooks","issue_events_url":"https://api.github.com/repos/benjumanji/util/issues/events{/number}","events_url":"https://api.github.com/repos/benjumanji/util/events","assignees_url":"https://api.github.com/repos/benjumanji/util/assignees{/user}","branches_url":"https://api.github.com/repos/benjumanji/util/branches{/branch}","tags_url":"https://api.github.com/repos/benjumanji/util/tags","blobs_url":"https://api.github.com/repos/benjumanji/util/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benjumanji/util/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benjumanji/util/git/refs{/sha}","trees_url":"https://api.github.com/repos/benjumanji/util/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benjumanji/util/statuses/{sha}","languages_url":"https://api.github.com/repos/benjumanji/util/languages","stargazers_url":"https://api.github.com/repos/benjumanji/util/stargazers","contributors_url":"https://api.github.com/repos/benjumanji/util/contributors","subscribers_url":"https://api.github.com/repos/benjumanji/util/subscribers","subscription_url":"https://api.github.com/repos/benjumanji/util/subscription","commits_url":"https://api.github.com/repos/benjumanji/util/commits{/sha}","git_commits_url":"https://api.github.com/repos/benjumanji/util/git/commits{/sha}","comments_url":"https://api.github.com/repos/benjumanji/util/comments{/number}","issue_comment_url":"https://api.github.com/repos/benjumanji/util/issues/comments{/number}","contents_url":"https://api.github.com/repos/benjumanji/util/contents/{+path}","compare_url":"https://api.github.com/repos/benjumanji/util/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benjumanji/util/merges","archive_url":"https://api.github.com/repos/benjumanji/util/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benjumanji/util/downloads","issues_url":"https://api.github.com/repos/benjumanji/util/issues{/number}","pulls_url":"https://api.github.com/repos/benjumanji/util/pulls{/number}","milestones_url":"https://api.github.com/repos/benjumanji/util/milestones{/number}","notifications_url":"https://api.github.com/repos/benjumanji/util/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benjumanji/util/labels{/name}","releases_url":"https://api.github.com/repos/benjumanji/util/releases{/id}","created_at":"2015-06-26T12:38:54Z","updated_at":"2015-06-26T12:38:55Z","pushed_at":"2015-06-26T12:39:11Z","git_url":"git://github.com/benjumanji/util.git","ssh_url":"git@github.com:benjumanji/util.git","clone_url":"https://github.com/benjumanji/util.git","svn_url":"https://github.com/benjumanji/util","homepage":"http://twitter.github.com/util","size":10029,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"twitter:develop","ref":"develop","sha":"d21b5b37c3460cc00726708d77e92eb2f2787e10","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":1527969,"name":"util","full_name":"twitter/util","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/util","description":"Wonderful reusable code from Twitter","fork":false,"url":"https://api.github.com/repos/twitter/util","forks_url":"https://api.github.com/repos/twitter/util/forks","keys_url":"https://api.github.com/repos/twitter/util/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/util/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/util/teams","hooks_url":"https://api.github.com/repos/twitter/util/hooks","issue_events_url":"https://api.github.com/repos/twitter/util/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/util/events","assignees_url":"https://api.github.com/repos/twitter/util/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/util/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/util/tags","blobs_url":"https://api.github.com/repos/twitter/util/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/util/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/util/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/util/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/util/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/util/languages","stargazers_url":"https://api.github.com/repos/twitter/util/stargazers","contributors_url":"https://api.github.com/repos/twitter/util/contributors","subscribers_url":"https://api.github.com/repos/twitter/util/subscribers","subscription_url":"https://api.github.com/repos/twitter/util/subscription","commits_url":"https://api.github.com/repos/twitter/util/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/util/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/util/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/util/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/util/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/util/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/util/merges","archive_url":"https://api.github.com/repos/twitter/util/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/util/downloads","issues_url":"https://api.github.com/repos/twitter/util/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/util/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/util/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/util/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/util/labels{/name}","releases_url":"https://api.github.com/repos/twitter/util/releases{/id}","created_at":"2011-03-26T01:23:21Z","updated_at":"2015-06-26T09:08:18Z","pushed_at":"2015-06-26T12:42:45Z","git_url":"git://github.com/twitter/util.git","ssh_url":"git@github.com:twitter/util.git","clone_url":"https://github.com/twitter/util.git","svn_url":"https://github.com/twitter/util","homepage":"http://twitter.github.com/util","size":10029,"stargazers_count":1185,"watchers_count":1185,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":233,"mirror_url":null,"open_issues_count":23,"forks":233,"open_issues":23,"watchers":1185,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/util/pulls/135"},"html":{"href":"https://github.com/twitter/util/pull/135"},"issue":{"href":"https://api.github.com/repos/twitter/util/issues/135"},"comments":{"href":"https://api.github.com/repos/twitter/util/issues/135/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/util/pulls/135/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/util/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twitter/util/pulls/135/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/util/statuses/b19d341f07128ba9e7b2ea715aab75ea5254a798"}}}}