{"action":"created","issue":{"url":"https://api.github.com/repos/collectd/go-collectd/issues/5","labels_url":"https://api.github.com/repos/collectd/go-collectd/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/collectd/go-collectd/issues/5/comments","events_url":"https://api.github.com/repos/collectd/go-collectd/issues/5/events","html_url":"https://github.com/collectd/go-collectd/pull/5","id":99772587,"number":5,"title":"nanosecond fix and additional test cases","user":{"login":"ryancox","id":111244,"avatar_url":"https://avatars.githubusercontent.com/u/111244?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancox","html_url":"https://github.com/ryancox","followers_url":"https://api.github.com/users/ryancox/followers","following_url":"https://api.github.com/users/ryancox/following{/other_user}","gists_url":"https://api.github.com/users/ryancox/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancox/subscriptions","organizations_url":"https://api.github.com/users/ryancox/orgs","repos_url":"https://api.github.com/users/ryancox/repos","events_url":"https://api.github.com/users/ryancox/events{/privacy}","received_events_url":"https://api.github.com/users/ryancox/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/collectd/go-collectd/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"octo","id":116087,"avatar_url":"https://avatars.githubusercontent.com/u/116087?v=3","gravatar_id":"","url":"https://api.github.com/users/octo","html_url":"https://github.com/octo","followers_url":"https://api.github.com/users/octo/followers","following_url":"https://api.github.com/users/octo/following{/other_user}","gists_url":"https://api.github.com/users/octo/gists{/gist_id}","starred_url":"https://api.github.com/users/octo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octo/subscriptions","organizations_url":"https://api.github.com/users/octo/orgs","repos_url":"https://api.github.com/users/octo/repos","events_url":"https://api.github.com/users/octo/events{/privacy}","received_events_url":"https://api.github.com/users/octo/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-08-08T04:57:33Z","updated_at":"2015-08-19T12:30:10Z","closed_at":"2015-08-18T15:13:46Z","pull_request":{"url":"https://api.github.com/repos/collectd/go-collectd/pulls/5","html_url":"https://github.com/collectd/go-collectd/pull/5","diff_url":"https://github.com/collectd/go-collectd/pull/5.diff","patch_url":"https://github.com/collectd/go-collectd/pull/5.patch"},"body":"I have been doing some work fuzz testing the network parsing code. While doing so, I noticed that I could not round-trip some packets that I captured via wireshark that contained high resolution cdtimes. The byte streams would be off by 1. I tracked this down to the newNano function and division by 1000000000. This forced a round. Since go rounds down, a nanosecond would be lost for non-zero nano-second values. I've added a fix for that as well as some additional test cases."},"comment":{"url":"https://api.github.com/repos/collectd/go-collectd/issues/comments/132573513","html_url":"https://github.com/collectd/go-collectd/pull/5#issuecomment-132573513","issue_url":"https://api.github.com/repos/collectd/go-collectd/issues/5","id":132573513,"user":{"login":"octo","id":116087,"avatar_url":"https://avatars.githubusercontent.com/u/116087?v=3","gravatar_id":"","url":"https://api.github.com/users/octo","html_url":"https://github.com/octo","followers_url":"https://api.github.com/users/octo/followers","following_url":"https://api.github.com/users/octo/following{/other_user}","gists_url":"https://api.github.com/users/octo/gists{/gist_id}","starred_url":"https://api.github.com/users/octo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octo/subscriptions","organizations_url":"https://api.github.com/users/octo/orgs","repos_url":"https://api.github.com/users/octo/repos","events_url":"https://api.github.com/users/octo/events{/privacy}","received_events_url":"https://api.github.com/users/octo/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T12:30:10Z","updated_at":"2015-08-19T12:30:10Z","body":"@ryancox it is now :) *collectd* used to take an easy way out by casting to double and doing the multiplication / division then. This was far more imprecise than the off-by-one fixes we've addressed here. The commit mentioned above fixes these issues in *collectd*, too."}}