Skip to main content

A live ticking clock with custom formatting.

Project description

MIT License
MIT License

Python 3.6
Python 3.6+

Author
Author: TheLostIdea1

Chronos Sync

Hello, time travelers! We all know that time... is money, but what if... you want to check the time with no clock? A python script or browsing the web helps. ChronosSync provides a live-ticking terminal experience with high-precision tools, mimicking the namespace style of the standard datetime library.


1. Installation & Setup

Install the library using pip from PyPI or TestPyPI:

Standard PyPI:

pip install chronossync

TestPyPI:

python -m pip install --index-url [https://test.pypi.org/simple/](https://test.pypi.org/simple/) chronossync

2. Usage & Syntax

ChronosSync allows you to use the library via the full namespace or by importing the class directly.

Live Clock

Evaluating the present() method triggers a live-updating clock in your terminal.

import chronossync
chronossync.chronossync.present()

OR

import chronossync
print(chronossync.chronossync.present()

#### Timer & Stopwatch
High-precision tools using `hh:mm:ss.ms` formatting.
```python
from chronossync import chronossync

# 10-second countdown timer
chronossync.timer(10)

# Endless stopwatch
chronossync.stopwatch()

Data Extraction

Extract specific strings without starting a loop.

clock = chronossync.present()
print(clock.date())   # Tuesday, 24th of February, 2026
print(clock.time())   # 06:45:12 PM
print(clock.tzone())  # GMT+06:00

3. Logic and Mechanics

  • Anti-Flicker (\r): Unlike scripts that clear the whole screen, ChronosSync uses carriage returns to overwrite the current line, preserving your terminal history.
  • Precision Timing: The Timer and Stopwatch use time.perf_counter() to remain accurate down to the millisecond, independent of system clock shifts.
  • The "Ordinal" Logic: Intentionally follows a custom convention inspired by internet culture:
    • 1st, 2nd, 3th (e.g., "3th of March").
    • Applies to the tens place: 21st, 22nd, 23th.
  • Graceful Termination: Press Ctrl+C at any time to stop the live loop and return to the prompt cleanly.

4. Development & Testing

This project uses the modern src layout. To verify the logic, run the test suite from the root directory:

python -m unittest discover tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chronossync-0.1.0.post3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chronossync-0.1.0.post3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file chronossync-0.1.0.post3.tar.gz.

File metadata

  • Download URL: chronossync-0.1.0.post3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for chronossync-0.1.0.post3.tar.gz
Algorithm Hash digest
SHA256 b35dc1cc8e5f12aee179395252d6546d1080b9d7da20548322b8146a6293e54c
MD5 9e9dfcdbe6729a153041d9d48b851ffa
BLAKE2b-256 4ef96875c7c1aea815b27e762e554ce4b34cc97299e2e454ea404abe9f18c522

See more details on using hashes here.

File details

Details for the file chronossync-0.1.0.post3-py3-none-any.whl.

File metadata

File hashes

Hashes for chronossync-0.1.0.post3-py3-none-any.whl
Algorithm Hash digest
SHA256 1053f2c749b95c276521ac4c700c0c5d07d05491e12d57c3448ba1f234b0c7bc
MD5 cd3822b837f1b0fd074eb67e48b73500
BLAKE2b-256 51e8d1e867513c0dba19bedd9dd859a1aba96d332d5a795e99664697ba0dc2db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page