{"id":20526398,"url":"https://github.com/powerbroker2/firetimer","last_synced_at":"2026-03-02T02:35:10.218Z","repository":{"id":98990526,"uuid":"236124772","full_name":"PowerBroker2/FireTimer","owner":"PowerBroker2","description":"Simple Arduino library used to \"fire-off\" processes at specific intervals","archived":false,"fork":false,"pushed_at":"2020-07-07T07:14:21.000Z","size":22,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T04:21:54.373Z","etag":null,"topics":["arduino-library","fire","software-timers","specific-intervals","timer","timer-functions","timers"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/PowerBroker2.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-25T04:21:59.000Z","updated_at":"2025-03-27T14:17:31.000Z","dependencies_parsed_at":"2023-04-08T05:18:00.323Z","dependency_job_id":null,"html_url":"https://github.com/PowerBroker2/FireTimer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/PowerBroker2/FireTimer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerBroker2%2FFireTimer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerBroker2%2FFireTimer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerBroker2%2FFireTimer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerBroker2%2FFireTimer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PowerBroker2","download_url":"https://codeload.github.com/PowerBroker2/FireTimer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerBroker2%2FFireTimer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"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":["arduino-library","fire","software-timers","specific-intervals","timer","timer-functions","timers"],"created_at":"2024-11-15T23:14:00.324Z","updated_at":"2026-03-02T02:35:10.210Z","avatar_url":"https://github.com/PowerBroker2.png","language":"C++","readme":"# FireTimer\n[![GitHub version](https://badge.fury.io/gh/PowerBroker2%2FFireTimer.svg)](https://badge.fury.io/gh/PowerBroker2%2FFireTimer) [![arduino-library-badge](https://www.ardu-badge.com/badge/FireTimer.svg?)](https://www.ardu-badge.com/FireTimer)\u003cbr /\u003e\u003cbr /\u003e\nSimple and non-blocking Arduino library used to \"fire-off\" processes at specific intervals\n\n# Example\n```C++\n#include \"FireTimer.h\"\n\nFireTimer msTimer;\nFireTimer usTimer;\n\nvoid setup()\n{\n  Serial.begin(115200);\n\n  msTimer.begin(1000);\n  usTimer.begin(1000000, MICRO_SECONDS);\n}\n\nvoid loop()\n{\n  if(msTimer.fire())\n    Serial.println(\"ms\");\n\n  if(usTimer.fire())\n    Serial.println(\"us\");\n}\n```\n\n# Example Explanation\nInclude the library to use:\n```c++\n#include \"FireTimer.h\"\n```\n\nInstantiate 2 instances of the FireTimer class - one for keeping time with millis() and another for keeping time with micros():\n```c++\nFireTimer msTimer;\nFireTimer usTimer;\n```\n\nInitialize the timers to both fire off at 1 second intervals without blocking. The first argument of \"begin()\" is the timeout and the second (optional) argument of \"begin()\" is the units of the timeout argument (ms or us):\n```c++\nmsTimer.begin(1000);\nusTimer.begin(1000000, MICRO_SECONDS);\n```\n\nDetermine if enough time has elapsed (timeout) based on the return value of \"fire()\". The \"fire()\" method returns a bool - true if timeout has occurred and false if not. If a timeout has occurred, it will automatically reset the timer (this \"resetting\" can be overridden, however). Here, once the timout has occurred, we print \"ms\" or \"us\" depending on the timer:\n```c++\nif(msTimer.fire())\n  Serial.println(\"ms\");\n\nif(usTimer.fire())\n  Serial.println(\"us\");\n ```\n \n# Other\nTo check for a timeout without resetting the timer:\n```c++\nmsTimer.fire(false) // Passing \"false\" prevents the timer from automatically resetting\n```\n\nTo force a timer reset:\n```c++\nmsTimer.start();\n```\n\nTo update the timer's timeout value:\n```c++\nmsTimer.update(100); // Save 100ms as the new timeout value and reset the timer\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowerbroker2%2Ffiretimer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowerbroker2%2Ffiretimer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowerbroker2%2Ffiretimer/lists"}