{"action":"created","issue":{"url":"https://api.github.com/repos/async-interop/event-loop/issues/10","repository_url":"https://api.github.com/repos/async-interop/event-loop","labels_url":"https://api.github.com/repos/async-interop/event-loop/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/async-interop/event-loop/issues/10/comments","events_url":"https://api.github.com/repos/async-interop/event-loop/issues/10/events","html_url":"https://github.com/async-interop/event-loop/issues/10","id":135097153,"number":10,"title":"Should time delays and intervals be an int or float?","user":{"login":"AndrewCarterUK","id":6486835,"avatar_url":"https://avatars.githubusercontent.com/u/6486835?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewCarterUK","html_url":"https://github.com/AndrewCarterUK","followers_url":"https://api.github.com/users/AndrewCarterUK/followers","following_url":"https://api.github.com/users/AndrewCarterUK/following{/other_user}","gists_url":"https://api.github.com/users/AndrewCarterUK/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewCarterUK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewCarterUK/subscriptions","organizations_url":"https://api.github.com/users/AndrewCarterUK/orgs","repos_url":"https://api.github.com/users/AndrewCarterUK/repos","events_url":"https://api.github.com/users/AndrewCarterUK/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewCarterUK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/async-interop/event-loop/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-20T16:46:19Z","updated_at":"2016-02-20T17:05:35Z","closed_at":null,"body":"Current opinions from other threads:\r\n\r\n@bwoebi https://github.com/async-interop/event-loop/issues/6#issuecomment-186619234\r\n\r\n> @AndrewCarterUK why are you proposing floats for times? The precision of the reactors/loops is one millisecond. (Some do allow for more, but e.g. for uv it's at most one millisecond. And we should be able to get same results for each backend.) At least that's the reason why Amp choose to use milliseconds as base unit and should be retained here.\r\n\r\n@trowski \r\n\r\n> @bwoebi Perhaps someday there can be greater precision than 1 ms. Using a float allows for that.\r\n\r\n@bwoebi\r\n\r\n> @trowski If there will ever be, it will be a BC break (significant enough for a major I mean) anyway as currently we should guarantee that all the backends use the same granularity for time management and that granularity would be changed too."},"comment":{"url":"https://api.github.com/repos/async-interop/event-loop/issues/comments/186655120","html_url":"https://github.com/async-interop/event-loop/issues/10#issuecomment-186655120","issue_url":"https://api.github.com/repos/async-interop/event-loop/issues/10","id":186655120,"user":{"login":"AndrewCarterUK","id":6486835,"avatar_url":"https://avatars.githubusercontent.com/u/6486835?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewCarterUK","html_url":"https://github.com/AndrewCarterUK","followers_url":"https://api.github.com/users/AndrewCarterUK/followers","following_url":"https://api.github.com/users/AndrewCarterUK/following{/other_user}","gists_url":"https://api.github.com/users/AndrewCarterUK/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewCarterUK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewCarterUK/subscriptions","organizations_url":"https://api.github.com/users/AndrewCarterUK/orgs","repos_url":"https://api.github.com/users/AndrewCarterUK/repos","events_url":"https://api.github.com/users/AndrewCarterUK/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewCarterUK/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T17:05:35Z","updated_at":"2016-02-20T17:05:35Z","body":"I'm not sure the physics analogy is appropriate - both milliseconds and seconds are 'natural' units.\r\n\r\nI also don't think there's any backwards compatibility issue. Event loop timers and sleep() calls are very approximate delays and advertised as such. An implementation being able to improve the accuracy of their timers wouldn't cause a BC break - and not any more than if you just switched it out for a different implementation that also had a different resolution."}}