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()

Timer & Stopwatch

High-precision tools using hh:mm:ss.ms formatting.

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.post2.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.post2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chronossync-0.1.0.post2.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.post2.tar.gz
Algorithm Hash digest
SHA256 e3393d1d10b605a3ae1f55de6e3f0bf6f1e74ac10886c95b10af322de9168b1e
MD5 016703b508bf8c2f15626ea4392c30d7
BLAKE2b-256 2730d143ba6089e021aff50abc779e92cfa4932e62f713a016c6858e4524e7a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chronossync-0.1.0.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 101c02cbd532ddabcda439667465004b89b2fb2c02d087ef1c7134bd54006807
MD5 7c1822633d10dc84d1ed2a613bc8139f
BLAKE2b-256 7ae9d3bf7658b6ffd3f01e06182cfa49ab1acbd2cf00f86a04a02af8465fa9ff

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