{"action":"closed","issue":{"url":"https://api.github.com/repos/gregorg/KISS_OSD/issues/6","repository_url":"https://api.github.com/repos/gregorg/KISS_OSD","labels_url":"https://api.github.com/repos/gregorg/KISS_OSD/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/gregorg/KISS_OSD/issues/6/comments","events_url":"https://api.github.com/repos/gregorg/KISS_OSD/issues/6/events","html_url":"https://github.com/gregorg/KISS_OSD/issues/6","id":139800891,"number":6,"title":"Timer doesn't display properly >65s and incorrectly counts 0m60s","user":{"login":"ikura","id":2194075,"avatar_url":"https://avatars.githubusercontent.com/u/2194075?v=3","gravatar_id":"","url":"https://api.github.com/users/ikura","html_url":"https://github.com/ikura","followers_url":"https://api.github.com/users/ikura/followers","following_url":"https://api.github.com/users/ikura/following{/other_user}","gists_url":"https://api.github.com/users/ikura/gists{/gist_id}","starred_url":"https://api.github.com/users/ikura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikura/subscriptions","organizations_url":"https://api.github.com/users/ikura/orgs","repos_url":"https://api.github.com/users/ikura/repos","events_url":"https://api.github.com/users/ikura/events{/privacy}","received_events_url":"https://api.github.com/users/ikura/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-10T06:38:44Z","updated_at":"2016-03-10T07:33:49Z","closed_at":"2016-03-10T07:33:49Z","body":"Using a uint16_t for time (in milliseconds) you overflow at 65.535s.  And you need to compare seconds >= 60 instead of > 60.  I corrected the code in two places (sorry for copy & paste, not easy to push a change right now) as per below.\r\n\r\n```\r\nstatic unsigned long start_time = 0;\r\nstatic unsigned long time = 0;\r\nstatic unsigned long total_time = 0;\r\n```\r\n\r\n```\r\nvoid print_time(unsigned long time, char *time_str) {\r\n    uint16_t seconds = time / 1000;\r\n    uint8_t mills = time % 1000;\r\n    uint8_t minutes = seconds / 60;\r\n    if (seconds >= 60) {\r\n```"}}