{"id":19146251,"url":"https://github.com/prodeveloper0/watchdogtimer","last_synced_at":"2025-02-22T19:49:17.741Z","repository":{"id":240418402,"uuid":"278647468","full_name":"prodeveloper0/WatchDogTimer","owner":"prodeveloper0","description":"The WatchDogTimer Library written to be fully compatible with C++11 and as header-only to use easily.","archived":false,"fork":false,"pushed_at":"2020-07-14T17:29:38.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-03T16:25:39.368Z","etag":null,"topics":["cpp-library","cpp11","header-only","watchdogtimer","wdt"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prodeveloper0.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}},"created_at":"2020-07-10T13:58:02.000Z","updated_at":"2020-07-14T17:29:40.000Z","dependencies_parsed_at":"2024-05-18T18:53:52.736Z","dependency_job_id":null,"html_url":"https://github.com/prodeveloper0/WatchDogTimer","commit_stats":null,"previous_names":["prodeveloper0/watchdogtimer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodeveloper0%2FWatchDogTimer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodeveloper0%2FWatchDogTimer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodeveloper0%2FWatchDogTimer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodeveloper0%2FWatchDogTimer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prodeveloper0","download_url":"https://codeload.github.com/prodeveloper0/WatchDogTimer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240229935,"owners_count":19768588,"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":["cpp-library","cpp11","header-only","watchdogtimer","wdt"],"created_at":"2024-11-09T07:43:40.006Z","updated_at":"2025-02-22T19:49:17.444Z","avatar_url":"https://github.com/prodeveloper0.png","language":"C++","readme":"# WatchDogTimer\nThe WatchDogTimer Library written to be fully compatible with C++11 and as header-only to use easily.\n\n## How to use\n### 0.  Including `wdt.hpp` header file on top of your cpp file.\n```C++\n#include \u003cwdt.hpp\u003e\n// Or\n#include \"wdt.hpp\"\n```\n\n### 1.  Subtyping your dog with `WatchdogTimer` class and implementing `on_timeout()` to bark to you.\n```C++\nclass MyWatchdogTimer : public WatchdogTimer\n{\npublic:\n  virtual void on_timeout()\n  {\n    // To do when your dog is bark.\n    ...\n  }\n};\n```\n\n### 2.  Creating your dog with subtyped `WatchdogTimer` class.\n```C++\nMyWatchdogTimer wdt;\n```\n\n### 3.  Kicking your dog by calling `kick()`.\n```C++\n// wdt is scheduled to call on_timeout() after 100ms once.\nwdt.kick(100);\n```\nAs well as, you can also kick your dog to watch forever by calling `kick()` with `loop` flag `true`.\n```C++\n// wdt is scheduled to call on_timeout() after 100ms forever.\nwdt.kick(100, true);\n```\n\n### 4.  Feeding your dog repeatedly to be silence by calling `clear()` repeatedly.\n```C++\nwhile (true)\n{\n  // To do somethings\n  ...\n  \n  if (there_is_no_problem)\n    wdt.clear();\n}\n```\n\n### 5.  Finally, Stopping your dog to watch by calling `stop()`.\n```C++\nwdt.stop();\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodeveloper0%2Fwatchdogtimer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprodeveloper0%2Fwatchdogtimer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodeveloper0%2Fwatchdogtimer/lists"}