{"id":16696018,"url":"https://github.com/hexdecimal/python-tcod-clock","last_synced_at":"2025-04-15T12:28:56.516Z","repository":{"id":65152929,"uuid":"584570702","full_name":"HexDecimal/python-tcod-clock","owner":"HexDecimal","description":"Track and limit the framerate of a Python program.","archived":false,"fork":false,"pushed_at":"2025-04-07T21:26:08.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T21:42:43.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/HexDecimal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"HexDecimal"}},"created_at":"2023-01-03T00:17:58.000Z","updated_at":"2025-04-07T21:26:01.000Z","dependencies_parsed_at":"2023-01-05T04:34:57.252Z","dependency_job_id":"2446c127-9d59-4261-953f-6215f0fdcf15","html_url":"https://github.com/HexDecimal/python-tcod-clock","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"061e9b45cbb0cfd862f4db31e52f236a0b01fd1d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexDecimal%2Fpython-tcod-clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexDecimal%2Fpython-tcod-clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexDecimal%2Fpython-tcod-clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexDecimal%2Fpython-tcod-clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HexDecimal","download_url":"https://codeload.github.com/HexDecimal/python-tcod-clock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249071505,"owners_count":21207995,"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":[],"created_at":"2024-10-12T17:25:25.136Z","updated_at":"2025-04-15T12:28:56.485Z","avatar_url":"https://github.com/HexDecimal.png","language":"Python","funding_links":["https://github.com/sponsors/HexDecimal"],"categories":[],"sub_categories":[],"readme":"# About\n\n[![PyPI](https://img.shields.io/pypi/v/tcod-clock)](https://pypi.org/project/tcod-clock/)\n[![PyPI - License](https://img.shields.io/pypi/l/tcod-clock)](https://github.com/HexDecimal/python-tcod-clock/blob/main/LICENSE)\n[![Documentation Status](https://readthedocs.org/projects/python-tcod-clock/badge/?version=latest)](https://python-tcod-clock.readthedocs.io)\n[![codecov](https://codecov.io/gh/HexDecimal/python-tcod-clock/branch/main/graph/badge.svg?token=UP161WEo0s)](https://codecov.io/gh/HexDecimal/python-tcod-clock)\n\nLibtcod used to include a global framerate limiter which was eventually deprecated.\nThis module was created as a replacement for that feature.\n\n```py\nimport time\n\nimport tcod.clock\n\n\nFPS = 30\n\nend_time = time.time() + 3  # Loop for 3 seconds.\n\nclock = tcod.clock.Clock()\nwhile time.time() \u003c end_time:\n    clock.sync(1 / FPS)  # This loop will run at 30 FPS until interrupted.\n\n# Timing information can be checked.  Check the docs for more info.\nprint(f\"{clock.last_fps=}\")\nprint(f\"{clock.min_fps=}\")\nprint(f\"{clock.max_fps=}\")\nprint(f\"{clock.mean_fps=}\")\nprint(f\"{clock.median_fps=}\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexdecimal%2Fpython-tcod-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexdecimal%2Fpython-tcod-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexdecimal%2Fpython-tcod-clock/lists"}