{"id":13663173,"url":"https://github.com/jeffreylanters/unity-timers","last_synced_at":"2025-04-25T13:32:08.378Z","repository":{"id":111560229,"uuid":"166030025","full_name":"jeffreylanters/unity-timers","owner":"jeffreylanters","description":"We may decide to execute a function not right now, but at a certain time later. That’s called “scheduling a call”. The Timers class helps you to do so with a clean and short syntax without having to worry about enumerators.","archived":true,"fork":false,"pushed_at":"2022-01-07T08:39:57.000Z","size":415,"stargazers_count":21,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-10T19:34:26.417Z","etag":null,"topics":["async","timers","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","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/jeffreylanters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"jeffreylanters"}},"created_at":"2019-01-16T11:37:57.000Z","updated_at":"2024-08-30T10:01:40.000Z","dependencies_parsed_at":"2023-05-29T12:58:45.647Z","dependency_job_id":null,"html_url":"https://github.com/jeffreylanters/unity-timers","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreylanters%2Funity-timers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreylanters%2Funity-timers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreylanters%2Funity-timers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreylanters%2Funity-timers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffreylanters","download_url":"https://codeload.github.com/jeffreylanters/unity-timers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250825034,"owners_count":21493383,"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":["async","timers","unity"],"created_at":"2024-08-02T05:02:19.968Z","updated_at":"2025-04-25T13:32:03.279Z","avatar_url":"https://github.com/jeffreylanters.png","language":"C#","readme":"\u003cdiv align=\"center\"\u003e\n\n![readme splash](https://raw.githubusercontent.com/jeffreylanters/unity-timers/master/.github/WIKI/repository-readme-splash.png)\n\n[![license](https://img.shields.io/badge/mit-license-red.svg?style=for-the-badge)](https://github.com/jeffreylanters/unity-timers/blob/master/LICENSE.md)\n[![openupm](https://img.shields.io/npm/v/nl.elraccoone.timers?label=UPM\u0026registry_uri=https://package.openupm.com\u0026style=for-the-badge\u0026color=232c37)](https://openupm.com/packages/nl.elraccoone.timers/)\n[![build](https://img.shields.io/badge/build-passing-brightgreen.svg?style=for-the-badge)](https://github.com/jeffreylanters/unity-timers/actions)\n[![deployment](https://img.shields.io/badge/state-success-brightgreen.svg?style=for-the-badge)](https://github.com/jeffreylanters/unity-timers/deployments)\n[![stars](https://img.shields.io/github/stars/jeffreylanters/unity-timers.svg?style=for-the-badge\u0026color=fe8523\u0026label=stargazers)](https://github.com/jeffreylanters/unity-timers/stargazers)\n[![awesome](https://img.shields.io/badge/listed-awesome-fc60a8.svg?style=for-the-badge)](https://github.com/jeffreylanters/awesome-unity-packages)\n[![size](https://img.shields.io/github/languages/code-size/jeffreylanters/unity-timers?style=for-the-badge)](https://github.com/jeffreylanters/unity-timers/blob/master/Runtime)\n[![sponsors](https://img.shields.io/github/sponsors/jeffreylanters?color=E12C9A\u0026style=for-the-badge)](https://github.com/sponsors/jeffreylanters)\n[![donate](https://img.shields.io/badge/donate-paypal-F23150?style=for-the-badge)](https://paypal.me/jeffreylanters)\n\nWe may decide to execute a function not right now, but at a certain time later. That’s called “scheduling a call”. The Timers class helps you to do so with a clean and short syntax without having to worry about enumerators.\n\n[**Installation**](#installation) \u0026middot;\n[**Documentation**](#documentation) \u0026middot;\n[**License**](./LICENSE.md)\n\n**Made with \u0026hearts; by Jeffrey Lanters**\n\n\u003c/div\u003e\n\n# Installation\n\n### Using the Unity Package Manager\n\nInstall the latest stable release using the Unity Package Manager by adding the following line to your `manifest.json` file located within your project's Packages directory, or by adding the Git URL to the Package Manager Window inside of Unity.\n\n```json\n\"nl.elraccoone.timers\": \"git+https://github.com/jeffreylanters/unity-timers\"\n```\n\n### Using OpenUPM\n\nThe module is availble on the OpenUPM package registry, you can install the latest stable release using the OpenUPM Package manager's Command Line Tool using the following command.\n\n```sh\nopenupm add nl.elraccoone.timers\n```\n\n# Documentation\n\n## Syntax\n\n```cs\nusing ElRaccoone.Timers;\nTimers.SetTimeout(/* miliseconds */ 1000, /* callback */ () =\u003e { /* ... */ });\nTimers.SetInterval(/* miliseconds */ 1000, /* callback */ () =\u003e { /* ... */ });\n```\n\n## Description\n\nWe may decide to execute a function not right now, but at a certain time later. That’s called “scheduling a call”. Note that the timers are using unscaled time.\n\nThere are two methods for it:\n\n- setTimeout allows to run a function once after the interval of time.\n- setInterval allows to run a function regularly with the interval between the runs.\n\n## Examples\n\n```cs\npublic class MyClass {\n  private void Awake () {\n    Timers.SetTimeout(1000, () =\u003e {\n      Debug.Log(\"A second has passed!\");\n    });\n    Timers.SetTimeout(1000, Notifiy);\n    Timers.SetInterval(2500, Notifiy);\n  }\n  private void Notify () {\n    Debug.Log(\"Notify!!\");\n  }\n}\n```\n","funding_links":["https://github.com/sponsors/jeffreylanters","https://paypal.me/jeffreylanters"],"categories":["C\\#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffreylanters%2Funity-timers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffreylanters%2Funity-timers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffreylanters%2Funity-timers/lists"}