{"action":"created","issue":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1797","repository_url":"https://api.github.com/repos/KSP-KOS/KOS","labels_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1797/labels{/name}","comments_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1797/comments","events_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1797/events","html_url":"https://github.com/KSP-KOS/KOS/issues/1797","id":174085686,"number":1797,"title":"Adding a \"CountDown\" structure","user":{"login":"Efratror","id":19653269,"avatar_url":"https://avatars.githubusercontent.com/u/19653269?v=3","gravatar_id":"","url":"https://api.github.com/users/Efratror","html_url":"https://github.com/Efratror","followers_url":"https://api.github.com/users/Efratror/followers","following_url":"https://api.github.com/users/Efratror/following{/other_user}","gists_url":"https://api.github.com/users/Efratror/gists{/gist_id}","starred_url":"https://api.github.com/users/Efratror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Efratror/subscriptions","organizations_url":"https://api.github.com/users/Efratror/orgs","repos_url":"https://api.github.com/users/Efratror/repos","events_url":"https://api.github.com/users/Efratror/events{/privacy}","received_events_url":"https://api.github.com/users/Efratror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/KSP-KOS/KOS/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-08-30T18:04:20Z","updated_at":"2016-10-01T01:59:25Z","closed_at":null,"body":"I would like to have some structure that is formatted like `TimeSpan`(with all it's suffixes) but is settable so you can use it to make a count down of x seconds. I first built a function in kOS to do this, but as you warp the code block isn't small enough for kOS to update it every second and it hangs.\r\n\r\nPS. here's the code I used. \r\n```\r\nFUNCTION CountDown {\r\n\tParameter timeUnit.\r\n\t\r\n\tLOCAL hourZero \t TO \"\".\r\n\tLOCAL minuteZero TO \"\".\r\n\tLOCAL secondZero TO \"\".\r\n\t\r\n\tLOCAL hourFloor TO FLOOR(timeUnit/3600).\r\n\tLOCAL minuteFloor TO FLOOR((timeUnit-(hourFloor*3600))/60).\r\n\tLOCAL secondFloor to FLOOR(timeUnit-(hourFloor*3600)-(minuteFloor*60)).\r\n\t\r\n\tIF hourFloor < 10 \t{SET hourZero \tTO \"0\".} \tELSE {SET hourZero \t TO \"\".}\r\n\tIF minuteFloor < 10 {SET minuteZero TO \"0\". } \tELSE {SET minuteZero TO \"\".}\r\n\tIF secondFloor < 10 {SET secondZero TO \"0\". } \tELSE {SET secondZero TO \"\".}\r\n\t\r\n\tLOCAL TimeUnit TO hourZero+hourFloor+\":\"+minuteZero+minuteFloor+\":\"+secondZero+secondFloor.\r\n\tRETURN TimeUnit.\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/comments/250885966","html_url":"https://github.com/KSP-KOS/KOS/issues/1797#issuecomment-250885966","issue_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1797","id":250885966,"user":{"login":"Efratror","id":19653269,"avatar_url":"https://avatars.githubusercontent.com/u/19653269?v=3","gravatar_id":"","url":"https://api.github.com/users/Efratror","html_url":"https://github.com/Efratror","followers_url":"https://api.github.com/users/Efratror/followers","following_url":"https://api.github.com/users/Efratror/following{/other_user}","gists_url":"https://api.github.com/users/Efratror/gists{/gist_id}","starred_url":"https://api.github.com/users/Efratror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Efratror/subscriptions","organizations_url":"https://api.github.com/users/Efratror/orgs","repos_url":"https://api.github.com/users/Efratror/repos","events_url":"https://api.github.com/users/Efratror/events{/privacy}","received_events_url":"https://api.github.com/users/Efratror/received_events","type":"User","site_admin":false},"created_at":"2016-10-01T01:59:25Z","updated_at":"2016-10-01T01:59:25Z","body":"If you don't plan to make a structure or a build-in function for a countdown system tis issue is fixed and should be closed."}}
{"actor":{"display_login":"Efratror"}}