{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/3593","labels_url":"https://api.github.com/repos/minetest/minetest/issues/3593/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/3593/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/3593/events","html_url":"https://github.com/minetest/minetest/pull/3593","id":127879374,"number":3593,"title":"New timer design.","user":{"login":"sofar","id":1880041,"avatar_url":"https://avatars.githubusercontent.com/u/1880041?v=3","gravatar_id":"","url":"https://api.github.com/users/sofar","html_url":"https://github.com/sofar","followers_url":"https://api.github.com/users/sofar/followers","following_url":"https://api.github.com/users/sofar/following{/other_user}","gists_url":"https://api.github.com/users/sofar/gists{/gist_id}","starred_url":"https://api.github.com/users/sofar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sofar/subscriptions","organizations_url":"https://api.github.com/users/sofar/orgs","repos_url":"https://api.github.com/users/sofar/repos","events_url":"https://api.github.com/users/sofar/events{/privacy}","received_events_url":"https://api.github.com/users/sofar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/minetest/minetest/labels/@%20Server%20/%20Client%20/%20Env.","name":"@ Server / Client / Env.","color":"009800"},{"url":"https://api.github.com/repos/minetest/minetest/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2016-01-21T09:20:56Z","updated_at":"2016-01-24T02:10:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/3593","html_url":"https://github.com/minetest/minetest/pull/3593","diff_url":"https://github.com/minetest/minetest/pull/3593.diff","patch_url":"https://github.com/minetest/minetest/pull/3593.patch"},"body":"I could honestly not make much sense of the timer implementation\r\nthat was here. Instead I've implemented the type of timer algorithm\r\nthat I've used before, and tested it instead.\r\n    \r\nThis implementation uses dtime as passed to this function and\r\nassumes it can be used for rough timekeeping, while giving sub\r\nsecond precision. Since no os.time() is used, we have excellent\r\nsub-second scheduling precision, but it should be assumed that\r\nserver ticks can cause ticks to be delayed for well over seconds\r\nin case of server load.\r\n    \r\nTimers are guaranteed to execute, even if delayed well beyond their\r\nscheduled time. Timers will never run before their allotted time\r\noccurs.\r\n    \r\nIf server load is high, all expired timers will trigger and\r\nserver lag may be increased. It is therefore important to\r\nschedule smaller jobs more often, and use fractional numbers\r\nand prime numbers to prevent coalescing of events.\r\n"},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/174243523","html_url":"https://github.com/minetest/minetest/pull/3593#issuecomment-174243523","issue_url":"https://api.github.com/repos/minetest/minetest/issues/3593","id":174243523,"user":{"login":"ShadowNinja","id":3399154,"avatar_url":"https://avatars.githubusercontent.com/u/3399154?v=3","gravatar_id":"","url":"https://api.github.com/users/ShadowNinja","html_url":"https://github.com/ShadowNinja","followers_url":"https://api.github.com/users/ShadowNinja/followers","following_url":"https://api.github.com/users/ShadowNinja/following{/other_user}","gists_url":"https://api.github.com/users/ShadowNinja/gists{/gist_id}","starred_url":"https://api.github.com/users/ShadowNinja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShadowNinja/subscriptions","organizations_url":"https://api.github.com/users/ShadowNinja/orgs","repos_url":"https://api.github.com/users/ShadowNinja/repos","events_url":"https://api.github.com/users/ShadowNinja/events{/privacy}","received_events_url":"https://api.github.com/users/ShadowNinja/received_events","type":"User","site_admin":false},"created_at":"2016-01-24T02:10:33Z","updated_at":"2016-01-24T02:10:33Z","body":"Note: any time sources used should be monotonic.  This means either `dtime` (although that seems to be inacurate and may not be monotonic either) or an API extension I think.\r\n"}}