{"id":19258436,"url":"https://github.com/maurodelazeri/elapsed_timer","last_synced_at":"2025-02-23T18:15:46.328Z","repository":{"id":150738315,"uuid":"201071754","full_name":"maurodelazeri/elapsed_timer","owner":"maurodelazeri","description":"header-only lib record time elapsed using C++11","archived":false,"fork":false,"pushed_at":"2019-08-07T15:29:38.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T09:22:08.015Z","etag":null,"topics":["cpp","elapsed-time","header-only","library"],"latest_commit_sha":null,"homepage":"","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/maurodelazeri.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}},"created_at":"2019-08-07T14:55:09.000Z","updated_at":"2020-10-23T15:07:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4cc52b1-c3a4-46fc-91de-1258215dfe08","html_url":"https://github.com/maurodelazeri/elapsed_timer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2Felapsed_timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2Felapsed_timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2Felapsed_timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2Felapsed_timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maurodelazeri","download_url":"https://codeload.github.com/maurodelazeri/elapsed_timer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240356189,"owners_count":19788512,"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","elapsed-time","header-only","library"],"created_at":"2024-11-09T19:13:22.153Z","updated_at":"2025-02-23T18:15:46.295Z","avatar_url":"https://github.com/maurodelazeri.png","language":"C++","readme":"Elapsed time for code blocks execution written in C++11\n\nThis is a simple header-only library `elapsed.h` just import in your project and you are ready to go...\n\nHere an example...\n \n```C++\n#include \u003crandom\u003e\n#include \"elapsed.h\"\n#include \"iostream\"\n\nusing namespace std;\n\nvoid Fibonacci()\n{\n    int t1 = 0, t2 = 1, nextTerm = 0, n;\n    n = 10;\n    cout \u003c\u003c \"Fibonacci Series: \" \u003c\u003c t1 \u003c\u003c \", \" \u003c\u003c t2 \u003c\u003c \", \";\n    nextTerm = t1 + t2;\n    while(nextTerm \u003c= n)\n    {\n        cout \u003c\u003c nextTerm \u003c\u003c \", \";\n        t1 = t2;\n        t2 = nextTerm;\n        nextTerm = t1 + t2;\n    }\n}\n\nint main() {\n    {\n        Elapsed elapsed;\n        Fibonacci();\n    }\n    {\n        auto elapsed = make_unique\u003cElapsed\u003e(\"Fibonacci func execution\");\n        Fibonacci();\n    }\n    return 0;\n}\n```\n\nBasically when `Elapsed elapsed;` go out of scope it will automatically display the elapsed time in `std::cout`\n\nThe execution above will produce something like:\n\n```\nFibonacci Series: 0, 1, 1, 2, 3, 5, 8, \n[ Elapsed time: : \t15 us ]\nFibonacci Series: 0, 1, 1, 2, 3, 5, 8, \n[ Fibonacci func execution : \t1 us ]\n```\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurodelazeri%2Felapsed_timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaurodelazeri%2Felapsed_timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurodelazeri%2Felapsed_timer/lists"}