{"id":20811917,"url":"https://github.com/activexdiamond/timekeeper","last_synced_at":"2026-04-23T06:33:20.745Z","repository":{"id":196356554,"uuid":"695811071","full_name":"ActivexDiamond/timekeeper","owner":"ActivexDiamond","description":"A simple single-file library for timing Lua functions. ","archived":false,"fork":false,"pushed_at":"2023-09-24T10:19:48.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-12-26T18:52:10.599Z","etag":null,"topics":["benchmark-script","benchmark-tool","benchmarking","helper","library","lua","script","timing","tool"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/ActivexDiamond.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}},"created_at":"2023-09-24T09:51:57.000Z","updated_at":"2025-12-17T00:05:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"89bb262d-b83c-4d6e-9974-26d9bfbc0c87","html_url":"https://github.com/ActivexDiamond/timekeeper","commit_stats":null,"previous_names":["activexdiamond/timekeeper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ActivexDiamond/timekeeper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivexDiamond%2Ftimekeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivexDiamond%2Ftimekeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivexDiamond%2Ftimekeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivexDiamond%2Ftimekeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ActivexDiamond","download_url":"https://codeload.github.com/ActivexDiamond/timekeeper/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivexDiamond%2Ftimekeeper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32169657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T02:19:40.750Z","status":"ssl_error","status_checked_at":"2026-04-23T02:17:55.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["benchmark-script","benchmark-tool","benchmarking","helper","library","lua","script","timing","tool"],"created_at":"2024-11-17T20:49:08.334Z","updated_at":"2026-04-23T06:33:20.726Z","avatar_url":"https://github.com/ActivexDiamond.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Timekeeper\nA simple single-file library for timing Lua functions. \n\nProvides only one main function, a small auxilary one, and fully optional configs.\n\nFully documented in-source using Sumneko's LuaLS!\n\n## WIP \nREADME is still very WIP, but the source code is plenty commented and fully documented, so that should hold you over for now!\n\n## Hello World\n```lua\nlocal timekeeper = require \"timekeeper\"\n\nlocal function foo(t, size)\n\tfor i = 1, size, do t[i] = {} end\nend\n\ntimekeeper(foo) \t--Will print out the time `foo` took!\n```\n\n## Installation\nJust copy `timekeeper.lua` wherever you want, then require it from the path you put it in. `timekeeper` does NOT define any globals, but can work just fine if required as a global.\n\nE.g. First, copy `timekeeper.lua` into your source folder, then;\n```lua\n--[RECOMMENDED] In every Lua file that uses timekeeper.\nlocal timekeeper = require \"timekeeper\"\n```\n**OR**\n```lua\n--In a single Lua file, that is executed before any code that uses `timekeeper`.\ntimekeeper = require \"timekeeper\"\n```\n\n## Auto-Completion\n`timekeeper` is fully documented using Sumneko's LuaLS annotations, so as long as you use any IDE which supports LSPs (language server protocols) (E.g. Visual Studio, Neovim, etc...) you should automatically get autocompletion! \n\nTroubleshooting auto-completion:\n1. Make sure that `timekeeper`s path is somewhere that LuaLS can see:\n   - Somewhere inside your source folder.\n   - Not excluded by your LuaLS config.\n2. Make sure LuaLS sees your source folder as a \"workspace\" (you have a `.git`, `.luarc.json`, and/or other in your source folder). For more info on this see (here)[https://luals.github.io/wiki/configuration/].\n\n## Public API\n### Timing\ntimekeeper(f[, ...])\n\ntimekeeper(opts[, ...])\n\nBoth are aliases for `timekeeper.time`\n### Instancing\ntimekeeper()\n\nAlias for `timekeeper.new`\n### Config / Opts\n\n## Private API\nInternally, `timekeeper` uses a bunch of small helper functions to get stuff done (mainly to keep the main `time` function from getting too long and unreadable). These have no real use outside of the `timekeeper` module itself, but are still put inside it in case someone finds a use for them. Those are all prefixed with `_` (single underscore).\n\n\n## License\n`timekeeper` is distributed under the MIT license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivexdiamond%2Ftimekeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivexdiamond%2Ftimekeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivexdiamond%2Ftimekeeper/lists"}