{"id":22449069,"url":"https://github.com/adambirds/chronos","last_synced_at":"2026-02-09T19:34:38.370Z","repository":{"id":266017258,"uuid":"896660284","full_name":"adambirds/chronos","owner":"adambirds","description":"Chronos: A Python library for advanced task timing with features like distributed timing, batch timing, real-time visualization, and debugging-friendly timers.","archived":false,"fork":false,"pushed_at":"2024-12-04T20:45:39.000Z","size":958,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-05T06:38:32.759Z","etag":null,"topics":["batch-processing","debugging","dev-tools","developer-tools","distributed-timing","open-source","performance-monitoring","profiling","python","python3","real-time-visualization","task-timer","task-timing","timer"],"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/adambirds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"adambirds"}},"created_at":"2024-12-01T00:33:20.000Z","updated_at":"2024-12-04T20:44:53.000Z","dependencies_parsed_at":"2025-10-17T02:43:32.414Z","dependency_job_id":"88447347-82c1-4175-95e9-844a69960f59","html_url":"https://github.com/adambirds/chronos","commit_stats":null,"previous_names":["adambirds/chronos"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adambirds/chronos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambirds%2Fchronos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambirds%2Fchronos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambirds%2Fchronos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambirds%2Fchronos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adambirds","download_url":"https://codeload.github.com/adambirds/chronos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambirds%2Fchronos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29278490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T19:05:41.198Z","status":"ssl_error","status_checked_at":"2026-02-09T19:05:37.449Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["batch-processing","debugging","dev-tools","developer-tools","distributed-timing","open-source","performance-monitoring","profiling","python","python3","real-time-visualization","task-timer","task-timing","timer"],"created_at":"2024-12-06T05:07:32.195Z","updated_at":"2026-02-09T19:34:38.341Z","avatar_url":"https://github.com/adambirds.png","language":"Python","funding_links":["https://github.com/sponsors/adambirds"],"categories":[],"sub_categories":[],"readme":"# Chronos\n\nChronos is a Python library for advanced task timing, performance monitoring, and debugging tools. It is designed for developers who need precise control over timing tasks, distributed systems, batch processing, and more, with features like real-time visualization and debugging-friendly timers.\n\n## Features\n\n-   **Base Timer**: Core functionality for timing tasks with unit conversion, logging, and threshold warnings.\n-   **ChronosTimer**: A basic timer with all core features.\n-   **DistributedChronosTimer**: Aggregate timing data across distributed systems.\n-   **BatchChronosTimer**: Time multiple tasks and compute aggregate statistics.\n-   **DebuggingChronosTimer**: Pause and resume timers during debugging sessions.\n-   **ChronosTimerWithVisualization**: Real-time ASCII progress bars for task timing.\n\n---\n\n## Installation\n\nInstall Chronos using pip:\n\n```bash\npip install chronos-context-timer\n```\n\n---\n\n## Usage Examples\n\n### Basic Timer\n\n```python\nfrom chronos import ChronosTimer\n\nwith ChronosTimer(\"Basic Task\") as timer:\n    # Simulate some work\n    import time\n    time.sleep(1)\n\nprint(f\"Task completed in {timer.get_elapsed('seconds')} seconds\")\n```\n\n### Distributed Timer\n\n```python\nfrom chronos import DistributedChronosTimer\n\nwith DistributedChronosTimer(\"Distributed Task\") as timer:\n    import time\n    time.sleep(1)\n\n# Add external timings\ntimer.add_timing(0.5)\ntimer.add_timing(1.5)\n\nprint(f\"Total elapsed time: {timer.get_total_time('seconds')} seconds\")\n```\n\n### Batch Timer\n\n```python\nfrom chronos import BatchChronosTimer\n\ndef example_task():\n    import time\n    time.sleep(0.5)\n\nbatch_timer = BatchChronosTimer(\"Batch Example\")\nfor _ in range(3):\n    batch_timer.time_task(example_task)\n\nstats = batch_timer.get_statistics(\"seconds\")\nprint(f\"Average time: {stats['average_time']} seconds\")\nprint(f\"Total time: {stats['total_time']} seconds\")\n```\n\n### Debugging Timer\n\n```python\nfrom chronos import DebuggingChronosTimer\n\nwith DebuggingChronosTimer(\"Debug Task\") as timer:\n    input(\"Press Ctrl+Z to pause, and again to resume. Press Enter to finish.\")\n```\n\n### Timer with Visualization\n\n```python\nfrom chronos import ChronosTimerWithVisualization\n\nwith ChronosTimerWithVisualization(\"Visualized Task\", interval=0.2, threshold=5):\n    import time\n    time.sleep(5)\n```\n\n---\n\n## Development\n\n### Running Tests\n\nRun all tests using pytest:\n\n```bash\npytest tests/\n```\n\n### Type Checking\n\nChronos is fully type-checked using `mypy`. To run type checks:\n\n```bash\nmypy chronos/\n```\n\n---\n\n## License\n\nChronos is licensed under the MIT License. See [LICENSE](/LICENSE) for details.\n\n---\n\n## Documentation\n\nComplete documentation is available [here](https://github.com/adambirds/chronos).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadambirds%2Fchronos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadambirds%2Fchronos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadambirds%2Fchronos/lists"}