Skip to main content

Time tool (Stop-Watch / Sleep / Pause / etc...)

Project description

error loading Epitech Logo error loading Jarbin-ToolKit Logo

Jarbin-ToolKit:Time v0.1.2.0

Latest development version 🟠 UNDER DEVELOPMENT 🟠 None 🟠
Latest release 🟢 RELEASED 🟢 v0.1.2.0 🟢

CodeQL Advanced Python package tester pages-build-deployment

Description

jarbin-toolkit:time is a Python library designed to help you create enhanced terminal interfaces. It's improving the appearance and readability of your command-line interface with lightweight animations, colorful text, and neat formatting. If you want to make your terminal programs more readable and visually structured, this library is for you!

Table of Contents

  1. Description
  2. Features
  3. Tech Stack
  4. Installation
  5. Usage
  6. Project Structure
  7. API Reference
  8. Release Notes
  9. License
  10. Important Links
  11. Footer

Features

  • Timers: Use the built-in stopwatch to measure how long parts of your code take to run.

Tech-Stack

  • Language: Python - Chosen for its readability and versatility.
  • Frameworks: Python - Entirely implemented in Python.

Installation

To begin , install jarbin-toolkit:time:

Prerequisites:

Make sure you have Python 3.11 or newer installed on your computer. You can check your Python version by opening a terminal and typing python --version.

Install from PyPI (recommended):

Open your terminal and run this command:

pip install jarbin_toolkit_time

This will automatically download and install the library from PyPI.

Install from GitHub:

If you want the latest version directly from the source, you can install it using git:

git clone -b latest NONE
make -C lib/jarbin_toolkit_time install

This downloads the code, then the install script handles the installation. These commands install the jarbin-toolkit:time package and its dependencies (datetime).

Usage

Here are some examples demonstrating how to use jarbin-toolkit:time:

Basic Error

from jarbin_toolkit_time import Time, StopWatch

API-Reference

  • Time: Static time utility helpers (waiting, pausing, precise elapsed measurement).

    • wait(sleep: int | float) -> float (staticmethod) Wait for a given number of seconds.

      • sleep: duration in seconds
      • Uses internal StopWatch
      • Returns the exact measured elapsed time
    • pause(msg: str = "Press enter to continue...") -> float (staticmethod) Pause program execution until user presses Enter.

      • msg: message displayed to the user
      • Returns the exact elapsed pause time
  • StopWatch: Lightweight elapsed time tracker.

    • StopWatch(start: bool = False) Create a stopwatch.

      • start: if True, automatically start at initialization
    • start() -> None Reset and start the stopwatch.

    • stop() -> None Stop the stopwatch (freezes elapsed value).

    • update() -> None Update internal elapsed time (if running).

    • elapsed(auto_update: bool = True) -> float Return elapsed time in seconds.

      • auto_update: automatically refresh before returning value
    • reset() -> None Reset elapsed time and stop the stopwatch.

    • __str__() -> str Return string representation of elapsed time.

    • __repr__() -> str Return constructor-style representation of the StopWatch object.

    • __eq__(other: float) -> bool Compare elapsed time with float (==).

    • __gt__(other: float) -> bool Compare elapsed time with float (>).

    • __ge__(other: float) -> bool Compare elapsed time with float (>=).

    • __lt__(other: float) -> bool Compare elapsed time with float (<).

    • __le__(other: float) -> bool Compare elapsed time with float (<=).

Release-Notes

  • v0.1.1:

    • [/] 1rst real release
  • v0.1.0:

    • [UPDATE] jarbin_toolkit_time update (removed unlinked sub-modules)
    • [INIT] add epitech_console to jarbin-toolkit (renamed jarbin_toolkit_time)

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Important-Links

Files

Wiki

Footer

⭐️ Like the project? Give it a star! 🐛 Found a bug? Report it in the issues!

last update : PACKAGE = 2026/01/21 ; README = 2026/02/12

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

jarbin_toolkit_time-0.1.2.0.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

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

jarbin_toolkit_time-0.1.2.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file jarbin_toolkit_time-0.1.2.0.tar.gz.

File metadata

  • Download URL: jarbin_toolkit_time-0.1.2.0.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for jarbin_toolkit_time-0.1.2.0.tar.gz
Algorithm Hash digest
SHA256 0a9be45631633c05d23e26963d8d044622aa6fc4145abca58d4539adb8303cdd
MD5 317b6c4dae67e865083a6faf75d5ada4
BLAKE2b-256 e968ee2f1a45a1691f76bffda1d6c7dba07918dcd7101fa603acf4083f690f0c

See more details on using hashes here.

File details

Details for the file jarbin_toolkit_time-0.1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jarbin_toolkit_time-0.1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67fe1db97c39463bb1c6210d42c9a0155e3831279946b81f73679841c0bf1500
MD5 ff1a08ec00d5a808cd7c5391eea410b6
BLAKE2b-256 1ea23292b197256e31fa4471a2dd5a0fc85e407334fe5af8243769c41dbe2358

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