{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/15598","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/15598/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/15598/comments","events_url":"https://api.github.com/repos/akka/akka/issues/15598/events","html_url":"https://github.com/akka/akka/issues/15598","id":38959107,"node_id":"MDU6SXNzdWUzODk1OTEwNw==","number":15598,"title":"Scheduler sometimes increments delay by a tick when rounding up","user":{"login":"jroper","id":105833,"node_id":"MDQ6VXNlcjEwNTgzMw==","avatar_url":"https://avatars0.githubusercontent.com/u/105833?v=4","gravatar_id":"","url":"https://api.github.com/users/jroper","html_url":"https://github.com/jroper","followers_url":"https://api.github.com/users/jroper/followers","following_url":"https://api.github.com/users/jroper/following{/other_user}","gists_url":"https://api.github.com/users/jroper/gists{/gist_id}","starred_url":"https://api.github.com/users/jroper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jroper/subscriptions","organizations_url":"https://api.github.com/users/jroper/orgs","repos_url":"https://api.github.com/users/jroper/repos","events_url":"https://api.github.com/users/jroper/events{/privacy}","received_events_url":"https://api.github.com/users/jroper/received_events","type":"User","site_admin":false},"labels":[{"id":92356828,"node_id":"MDU6TGFiZWw5MjM1NjgyOA==","url":"https://api.github.com/repos/akka/akka/labels/1%20-%20triaged","name":"1 - triaged","color":"5319e7","default":false},{"id":92616708,"node_id":"MDU6TGFiZWw5MjYxNjcwOA==","url":"https://api.github.com/repos/akka/akka/labels/help%20wanted","name":"help wanted","color":"009800","default":true},{"id":103387437,"node_id":"MDU6TGFiZWwxMDMzODc0Mzc=","url":"https://api.github.com/repos/akka/akka/labels/t:core","name":"t:core","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/akka/akka/milestones/55","html_url":"https://github.com/akka/akka/milestone/55","labels_url":"https://api.github.com/repos/akka/akka/milestones/55/labels","id":1257017,"node_id":"MDk6TWlsZXN0b25lMTI1NzAxNw==","number":55,"title":"2.4.x","description":"","creator":{"login":"patriknw","id":336161,"node_id":"MDQ6VXNlcjMzNjE2MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/336161?v=4","gravatar_id":"","url":"https://api.github.com/users/patriknw","html_url":"https://github.com/patriknw","followers_url":"https://api.github.com/users/patriknw/followers","following_url":"https://api.github.com/users/patriknw/following{/other_user}","gists_url":"https://api.github.com/users/patriknw/gists{/gist_id}","starred_url":"https://api.github.com/users/patriknw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriknw/subscriptions","organizations_url":"https://api.github.com/users/patriknw/orgs","repos_url":"https://api.github.com/users/patriknw/repos","events_url":"https://api.github.com/users/patriknw/events{/privacy}","received_events_url":"https://api.github.com/users/patriknw/received_events","type":"User","site_admin":false},"open_issues":124,"closed_issues":13,"state":"open","created_at":"2015-08-16T17:29:51Z","updated_at":"2018-10-19T14:49:02Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2014-07-29T05:27:58Z","updated_at":"2018-10-21T16:57:34Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The following code should produce a value that is equal to the maximum time you can wait for the scheduler:\n\n``` scala\nval tickNanos = config.getDuration(\"akka.scheduler.tick-duration\", TimeUnit.NANOSECONDS)\n(tickNanos * Int.MaxValue).nanos\n```\n\nWhen you pass this number to the scheduler though, it throws an exception saying it's too far in the future.  Why?  Because the `roundUp` function in the scheduler is incrementing the delay by 1 tick, even though the delay is exactly divisible by the tick (thus it's breaking its contract).  This is because it uses `FiniteDuration./`, which returns a double, and then converting that back to a long, which through the wonders of imprecise floating point arithmetic, results in a delay that is one tick greater than it should be.\n\n`roundUp` should not use `FiniteDuration./`, it should use a precise method, such as converting all values to nanoseconds, and then using a standard `long` divide.\n"},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/431685087","html_url":"https://github.com/akka/akka/issues/15598#issuecomment-431685087","issue_url":"https://api.github.com/repos/akka/akka/issues/15598","id":431685087,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTY4NTA4Nw==","user":{"login":"hepin1989","id":501740,"node_id":"MDQ6VXNlcjUwMTc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/501740?v=4","gravatar_id":"","url":"https://api.github.com/users/hepin1989","html_url":"https://github.com/hepin1989","followers_url":"https://api.github.com/users/hepin1989/followers","following_url":"https://api.github.com/users/hepin1989/following{/other_user}","gists_url":"https://api.github.com/users/hepin1989/gists{/gist_id}","starred_url":"https://api.github.com/users/hepin1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hepin1989/subscriptions","organizations_url":"https://api.github.com/users/hepin1989/orgs","repos_url":"https://api.github.com/users/hepin1989/repos","events_url":"https://api.github.com/users/hepin1989/events{/privacy}","received_events_url":"https://api.github.com/users/hepin1989/received_events","type":"User","site_admin":false},"created_at":"2018-10-21T16:57:34Z","updated_at":"2018-10-21T16:57:34Z","author_association":"CONTRIBUTOR","body":"@patriknw This one should be closed."}}
{"actor":{"display_login":"hepin1989"}}