{"action":"created","issue":{"url":"https://api.github.com/repos/mixpanel/mixpanel-iphone/issues/413","labels_url":"https://api.github.com/repos/mixpanel/mixpanel-iphone/issues/413/labels{/name}","comments_url":"https://api.github.com/repos/mixpanel/mixpanel-iphone/issues/413/comments","events_url":"https://api.github.com/repos/mixpanel/mixpanel-iphone/issues/413/events","html_url":"https://github.com/mixpanel/mixpanel-iphone/pull/413","id":126870841,"number":413,"title":"Prevent negative $duration values","user":{"login":"jaredmixpanel","id":10504508,"avatar_url":"https://avatars.githubusercontent.com/u/10504508?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredmixpanel","html_url":"https://github.com/jaredmixpanel","followers_url":"https://api.github.com/users/jaredmixpanel/followers","following_url":"https://api.github.com/users/jaredmixpanel/following{/other_user}","gists_url":"https://api.github.com/users/jaredmixpanel/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredmixpanel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredmixpanel/subscriptions","organizations_url":"https://api.github.com/users/jaredmixpanel/orgs","repos_url":"https://api.github.com/users/jaredmixpanel/repos","events_url":"https://api.github.com/users/jaredmixpanel/events{/privacy}","received_events_url":"https://api.github.com/users/jaredmixpanel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-15T13:21:08Z","updated_at":"2016-01-20T20:42:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mixpanel/mixpanel-iphone/pulls/413","html_url":"https://github.com/mixpanel/mixpanel-iphone/pull/413","diff_url":"https://github.com/mixpanel/mixpanel-iphone/pull/413.diff","patch_url":"https://github.com/mixpanel/mixpanel-iphone/pull/413.patch"},"body":"Fixes a race condition between timeEvent: and track: that leads to negative $duration values, due to the start time being captured asynchronously, while the event timestamp is recorded on the main thread. To prevent the start time from being evaluated after the event has been tracked, we simply capture the start time inside of timeEvent: before dispatching asynchronously."},"comment":{"url":"https://api.github.com/repos/mixpanel/mixpanel-iphone/issues/comments/173353236","html_url":"https://github.com/mixpanel/mixpanel-iphone/pull/413#issuecomment-173353236","issue_url":"https://api.github.com/repos/mixpanel/mixpanel-iphone/issues/413","id":173353236,"user":{"login":"samgreen","id":276118,"avatar_url":"https://avatars.githubusercontent.com/u/276118?v=3","gravatar_id":"","url":"https://api.github.com/users/samgreen","html_url":"https://github.com/samgreen","followers_url":"https://api.github.com/users/samgreen/followers","following_url":"https://api.github.com/users/samgreen/following{/other_user}","gists_url":"https://api.github.com/users/samgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/samgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samgreen/subscriptions","organizations_url":"https://api.github.com/users/samgreen/orgs","repos_url":"https://api.github.com/users/samgreen/repos","events_url":"https://api.github.com/users/samgreen/events{/privacy}","received_events_url":"https://api.github.com/users/samgreen/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T20:42:40Z","updated_at":"2016-01-20T20:42:40Z","body":"Thanks!"}}