{"action":"created","issue":{"url":"https://api.github.com/repos/tailhook/rotor/issues/12","repository_url":"https://api.github.com/repos/tailhook/rotor","labels_url":"https://api.github.com/repos/tailhook/rotor/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/tailhook/rotor/issues/12/comments","events_url":"https://api.github.com/repos/tailhook/rotor/issues/12/events","html_url":"https://github.com/tailhook/rotor/issues/12","id":133847099,"number":12,"title":"A way to identify Timeouts","user":{"login":"seanmonstar","id":51479,"avatar_url":"https://avatars.githubusercontent.com/u/51479?v=3","gravatar_id":"","url":"https://api.github.com/users/seanmonstar","html_url":"https://github.com/seanmonstar","followers_url":"https://api.github.com/users/seanmonstar/followers","following_url":"https://api.github.com/users/seanmonstar/following{/other_user}","gists_url":"https://api.github.com/users/seanmonstar/gists{/gist_id}","starred_url":"https://api.github.com/users/seanmonstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanmonstar/subscriptions","organizations_url":"https://api.github.com/users/seanmonstar/orgs","repos_url":"https://api.github.com/users/seanmonstar/repos","events_url":"https://api.github.com/users/seanmonstar/events{/privacy}","received_events_url":"https://api.github.com/users/seanmonstar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-16T00:05:14Z","updated_at":"2016-02-16T04:22:32Z","closed_at":null,"body":"A way is needed to identify which timeout is ocurring in `Machine::timeout`. The only way to attempt to match timeouts currently is by checking the clock and comparing with timeouts that have been set. However, this isn't precise, and is possibly an unnecessary check of the clock.\r\n\r\n`Scope::timeout_ms` could either return a `TimeoutId` or similar, that is passed to `Machine::timeout`, so they can be matched, or probably the better option, is to allow timeouts to be generic over an associated type. `scope.timeout_ms(Next::Read, 5_000); scope.timeout_ms(Next::Write, 1_000)`, for instance."},"comment":{"url":"https://api.github.com/repos/tailhook/rotor/issues/comments/184510658","html_url":"https://github.com/tailhook/rotor/issues/12#issuecomment-184510658","issue_url":"https://api.github.com/repos/tailhook/rotor/issues/12","id":184510658,"user":{"login":"tailhook","id":321799,"avatar_url":"https://avatars.githubusercontent.com/u/321799?v=3","gravatar_id":"","url":"https://api.github.com/users/tailhook","html_url":"https://github.com/tailhook","followers_url":"https://api.github.com/users/tailhook/followers","following_url":"https://api.github.com/users/tailhook/following{/other_user}","gists_url":"https://api.github.com/users/tailhook/gists{/gist_id}","starred_url":"https://api.github.com/users/tailhook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tailhook/subscriptions","organizations_url":"https://api.github.com/users/tailhook/orgs","repos_url":"https://api.github.com/users/tailhook/repos","events_url":"https://api.github.com/users/tailhook/events{/privacy}","received_events_url":"https://api.github.com/users/tailhook/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T04:22:32Z","updated_at":"2016-02-16T04:22:32Z","body":"Sure.\r\n\r\n(technically timeout will be cleared after ready, only if ready returns either no timeout or a different timeout as a result, but that's optimization, effect is the same)"}}