{"action":"opened","issue":{"url":"https://api.github.com/repos/knowstack/DDStopWatch/issues/1","labels_url":"https://api.github.com/repos/knowstack/DDStopWatch/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/knowstack/DDStopWatch/issues/1/comments","events_url":"https://api.github.com/repos/knowstack/DDStopWatch/issues/1/events","html_url":"https://github.com/knowstack/DDStopWatch/issues/1","id":122070222,"number":1,"title":"This is wrong!","user":{"login":"pascalfribi","id":6162292,"avatar_url":"https://avatars.githubusercontent.com/u/6162292?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalfribi","html_url":"https://github.com/pascalfribi","followers_url":"https://api.github.com/users/pascalfribi/followers","following_url":"https://api.github.com/users/pascalfribi/following{/other_user}","gists_url":"https://api.github.com/users/pascalfribi/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalfribi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalfribi/subscriptions","organizations_url":"https://api.github.com/users/pascalfribi/orgs","repos_url":"https://api.github.com/users/pascalfribi/repos","events_url":"https://api.github.com/users/pascalfribi/events{/privacy}","received_events_url":"https://api.github.com/users/pascalfribi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-14T15:51:42Z","updated_at":"2015-12-14T15:51:42Z","closed_at":null,"body":"Hi,\r\n\r\nplease read the Apple Docs carefully. There is no guarantee that the selector is actually invoked every interval:\r\nhttps://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/\r\n\r\nSpecifically from Apples Docs:\r\n\"A repeating timer always schedules itself based on the scheduled firing time, as opposed to the actual firing time. For example, if a timer is scheduled to fire at a particular time and every 5 seconds after that, the scheduled firing time will always fall on the original 5 second time intervals, even if the actual firing time gets delayed. If the firing time is delayed so far that it passes one or more of the scheduled firing times, the timer is fired only once for that time period; the timer is then rescheduled, after firing, for the next scheduled firing time in the future.\"\r\n\r\nIn your case you could loose time, if the timer is delayed because you always count up assuming that the timer fires every time!\r\n\r\nYou should rather calculate the time difference since the start of the timer to the actual time to be sure you are using the correct value."}}