{"id":13745142,"url":"https://github.com/ethankennerly/regulate","last_synced_at":"2026-01-21T02:35:12.487Z","repository":{"id":4190281,"uuid":"5308574","full_name":"ethankennerly/regulate","owner":"ethankennerly","description":"Accurate and efficient timer in ActionScript.","archived":false,"fork":false,"pushed_at":"2012-11-25T23:16:13.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-04T05:05:44.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethankennerly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-06T01:21:56.000Z","updated_at":"2016-11-12T21:07:22.000Z","dependencies_parsed_at":"2022-07-20T19:02:18.538Z","dependency_job_id":null,"html_url":"https://github.com/ethankennerly/regulate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethankennerly%2Fregulate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethankennerly%2Fregulate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethankennerly%2Fregulate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethankennerly%2Fregulate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethankennerly","download_url":"https://codeload.github.com/ethankennerly/regulate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224819833,"owners_count":17375340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:01:23.331Z","updated_at":"2026-01-21T02:35:12.479Z","avatar_url":"https://github.com/ethankennerly.png","language":"ActionScript","readme":"regulate\n========\n\nAccurate and efficient timers in ActionScript.\nRegulates time up to 10x more accurately than default Timer.\n\n               Max      Sum\n    Regulate:    3 ms.   -1 ms.\n    Watch:      34 ms.   -3 ms.\n    Timer:      35 ms.  200 ms.\n\nRegulate:  Compensates the timer's interval.\nWatch:  Watches every frame until the interval would occur.\n\nPick a delay that is a whole divisor of the target browser's frame rate.\nThis example is 30 fps with 500 millisecond delay (15 frames).\nIn low-end browsers, 30 fps is the practical upper limit to frame rate.\nIn high-end browsers, 60 fps is the practical upper limit to frame rate.\nhttp://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Timer.html\n\nRegulate is more efficient than Harrison or Accurate Timer,\nbecause it has simpler data structures and operations.\n\nTests depend on AsUnit 3.0.\nFLA depends on Flash CS4.  No animation.\n\nLinks to other accurate timers:\n\nhttp://cookbooks.adobe.com/post_Accurate_timer-17332.html\nhttp://www.computus.org/journal/?p=25\nhttp://www.computus.org/journal/?page_id=869\n\nTinic Uro, Adobe Flash Engineer, explained why timing may be irregular in Flash Player 10.1:\n\n\"Timing it right\"\nhttp://blog.kaourantin.net/?p=82\n\nExample report:\n\nRegular Timer reportTime: delay: 500 frameRate: 30 repeatCount: 20\ntimes: 1115,1613,2115,2613,3114,3616,4114,4614,5115,5613,6114,6616,7114,7614,8116,8614,9114,9616,10114,10614\nintervals: 498,502,498,501,502,498,500,501,498,501,502,498,500,502,498,500,502,498,500\nafter first 2, min: 498 max: 502 sum: 8499 expected sum: 8500 drift: -1\ndrifts: 2,0,1,3,1,1,2,0,1,3,1,1,3,1,1,3,1,1\nafter first 4, min: 0 max: 3\n\nWatch Stage reportTime: delay: 500 frameRate: 30 repeatCount: 20\ntimes: 1081,1549,2083,2581,3082,3582,4080,4582,5083,5581,6082,6582,7080,7582,8082,8580,9082,9582,10080,10580\nintervals: 468,534,498,501,500,498,502,501,498,501,500,498,502,500,498,502,500,498,500\nafter first 2, min: 498 max: 502 sum: 8497 expected sum: 8500 drift: -3\ndrifts: 34,32,33,33,31,33,34,32,33,33,31,33,33,31,33,33,31,31\nafter first 4, min: 31 max: 34\n\nreportTime: delay: 500 frameRate: 30 repeatCount: 20\ntimes: 1183,1713,2215,2716,3246,3746,4248,4782,5313,5814,6314,6814,7314,7816,8346,8846,9348,9882,10412,10915\nintervals: 530,502,501,530,500,502,534,531,501,500,500,500,502,530,500,502,534,530,503\nafter first 2, min: 500 max: 534 sum: 8700 expected sum: 8500 drift: 200\ndrifts: 2,3,33,33,35,69,100,101,101,101,101,103,133,133,135,169,199,202\nafter first 4, min: 35 max: 202\n\n\n\nLicense MIT\n","funding_links":[],"categories":["Unsorted"],"sub_categories":["Other API"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethankennerly%2Fregulate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethankennerly%2Fregulate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethankennerly%2Fregulate/lists"}