Skip to main content

About

PyPI PyPI - License Documentation Status codecov

Libtcod used to include a global framerate limiter which was eventually deprecated. This module was created as a replacement for that feature.

import time

import tcod.clock


FPS = 30

end_time = time.time() + 3  # Loop for 3 seconds.

clock = tcod.clock.Clock()
while time.time() < end_time:
    clock.sync(1 / FPS)  # This loop will run at 30 FPS until interrupted.

# Timing information can be checked.  Check the docs for more info.
print(f"{clock.last_fps=}")
print(f"{clock.min_fps=}")
print(f"{clock.max_fps=}")
print(f"{clock.mean_fps=}")
print(f"{clock.median_fps=}")

Metadata

Release files for tcod-clock 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tcod-clock 1.0.1
File Size Uploaded Provenance Actions
tcod-clock-1.0.1.tar.gz 12.1 kB Without provenance Details for tcod-clock-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tcod-clock 1.0.1
File Interpreter ABI Platform Actions
tcod_clock-1.0.1-py3-none-any.whl Python 3 none any Details for tcod_clock-1.0.1-py3-none-any.whl

Total release size: 16.5 kB

Release files / tcod-clock-1.0.1.tar.gz

Download URL tcod-clock-1.0.1.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9f2974beb0cf47239929eefb1e7e1823126e43ce7ecac184736bc70540d310d7
BLAKE2b-256 checksum
How to use checksums
814b49ccef4579f5023a7150451bf752c8ad08a55701258cf57d3a52d3a7b907
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Release files / tcod_clock-1.0.1-py3-none-any.whl

Download URL tcod_clock-1.0.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80ec3d3948a6397f0e7667612d6c8f786ad9a551f7557b3f2027fc99c8d8ac46
BLAKE2b-256 checksum
How to use checksums
9aef633aac2b1663b1af760ac201d3f0224f25a3b6417359a729520061ec80fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Security for tcod-clock 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page