{"id":29825923,"url":"https://github.com/421p/stimer","last_synced_at":"2025-07-29T04:12:56.091Z","repository":{"id":56938336,"uuid":"96740979","full_name":"421p/stimer","owner":"421p","description":"Pausable timer for reactphp-event-loop","archived":false,"fork":false,"pushed_at":"2018-04-12T20:21:45.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-27T03:05:55.886Z","etag":null,"topics":["async","event-loop","pause","reactphp","resume","state","timer"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/421p.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-10T05:59:11.000Z","updated_at":"2019-07-04T06:54:29.000Z","dependencies_parsed_at":"2022-08-21T06:50:06.784Z","dependency_job_id":null,"html_url":"https://github.com/421p/stimer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/421p/stimer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/421p%2Fstimer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/421p%2Fstimer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/421p%2Fstimer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/421p%2Fstimer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/421p","download_url":"https://codeload.github.com/421p/stimer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/421p%2Fstimer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267627269,"owners_count":24117716,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["async","event-loop","pause","reactphp","resume","state","timer"],"created_at":"2025-07-29T04:12:55.514Z","updated_at":"2025-07-29T04:12:56.085Z","avatar_url":"https://github.com/421p.png","language":"PHP","readme":"## Stimer, a timer with pause/resume feature.\n\nAnd immediately proceed to the samples:\n\nRegular timer:\n\n```php\n$loop = Factory::create();\n$interval = 5;\n\n$timer = new Timer($loop, $interval, function () { echo 'hello world'; });\n\n// ... 3 seconds\n\n$timer-\u003epause();\n$timer-\u003egetLeftInterval(); // ~ 2 seconds\n\n// ... something happens\n\n$timer-\u003eresume();\n\n// ... 2 seconds\n\n// hello world\n\n```\n\nPeriodic timer:\n\n```php\n$loop = Factory::create();\n$interval = 5;\n\n$timer = new PeriodicTimer($loop, $interval, function () { echo 'hello world'; });\n\n// ... 3 seconds\n\n$timer-\u003epause();\n$timer-\u003egetLeftInterval(); // ~ 2 seconds\n\n// ... something happens\n\n$timer-\u003eresume();\n\n// ... 2 seconds\n\n// hello world\n\n// ... 5 seconds\n\n// hello world\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F421p%2Fstimer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F421p%2Fstimer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F421p%2Fstimer/lists"}