{"id":47737708,"url":"https://github.com/dandre3000/fixed-time-step","last_synced_at":"2026-04-02T23:00:48.071Z","repository":{"id":345799737,"uuid":"1187441909","full_name":"dandre3000/fixed-time-step","owner":"dandre3000","description":"Call a function on a fixed interval over a variable timespan.","archived":false,"fork":false,"pushed_at":"2026-03-20T18:25:00.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-21T09:39:25.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/dandre3000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-20T18:21:04.000Z","updated_at":"2026-03-20T18:24:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dandre3000/fixed-time-step","commit_stats":null,"previous_names":["dandre3000/fixed-time-step"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dandre3000/fixed-time-step","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandre3000%2Ffixed-time-step","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandre3000%2Ffixed-time-step/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandre3000%2Ffixed-time-step/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandre3000%2Ffixed-time-step/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dandre3000","download_url":"https://codeload.github.com/dandre3000/fixed-time-step/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandre3000%2Ffixed-time-step/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31318132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T21:35:00.834Z","status":"ssl_error","status_checked_at":"2026-04-02T21:34:59.806Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-04-02T23:00:30.419Z","updated_at":"2026-04-02T23:00:48.060Z","avatar_url":"https://github.com/dandre3000.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fixed-time-step\n\nCall a function on a fixed interval over a variable timespan.\n\n## Installation\n\nnpm i @dandre3000/fixed-time-step\n\n## Usage\n\n```js\nimport { FixedTimeStep } from '@dandre3000/fixed-time-step'\n\nconst fts = new FixedTimeStep(1000 / 60, (t, ...args) =\u003e {\n    console.log(t, elapsedTime, i, ...args) // 1000 / 60, ...\n\n    elapsedTime += t\n    i++\n})\n\nlet time = performance.now()\nlet elapsedTime = 0\nlet i = 0\n\nsetInterval(() =\u003e {\n    const dt = performance.now() - time\n\n    fts.step(dt, { args: ['YOOO'] })\n    time = performance.now()\n})\n```\n\n## Exports\n\n\u003ch4\u003e\n    interface StepOptions {\u003cbr/\u003e\n        \u0026emsp;args: boolean\u003cbr/\u003e\n        \u0026emsp;self: boolean\u003cbr/\u003e\n    }\n\u003c/h4\u003e\n\n### Class FixedTimeStep\n\n#### constructor (interval: number, callback: (...args: any[]) =\u003e void)\n\n### Instance\n\n#### interval: number\n\n#### callback: (...args: any[]) =\u003e void\n\n#### step (time: number, options?: StepOptions) =\u003e number\n\n## License\n\n[MIT](https://github.com/dandre3000/async-keyboard-pointer/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandre3000%2Ffixed-time-step","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdandre3000%2Ffixed-time-step","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandre3000%2Ffixed-time-step/lists"}