{"id":23261135,"url":"https://github.com/sebres/tclclockmod","last_synced_at":"2025-08-20T16:34:29.918Z","repository":{"id":45014081,"uuid":"100275793","full_name":"sebres/tclclockmod","owner":"sebres","description":"Tcl clock extension: faster Tcl-module for the replacement of the standard \"clock\" ensemble of tcl","archived":false,"fork":false,"pushed_at":"2024-10-29T20:54:12.000Z","size":1433,"stargazers_count":10,"open_issues_count":3,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T21:15:59.623Z","etag":null,"topics":["linux","macos","tcl","tcl-clock","tcl-extension","unix","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebres.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.terms","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}},"created_at":"2017-08-14T14:19:44.000Z","updated_at":"2024-10-29T20:54:02.000Z","dependencies_parsed_at":"2024-03-22T21:25:48.736Z","dependency_job_id":"09ee142c-4dd6-4d1a-88f3-ea6112f1d19f","html_url":"https://github.com/sebres/tclclockmod","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebres%2Ftclclockmod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebres%2Ftclclockmod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebres%2Ftclclockmod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebres%2Ftclclockmod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebres","download_url":"https://codeload.github.com/sebres/tclclockmod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230441268,"owners_count":18226356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["linux","macos","tcl","tcl-clock","tcl-extension","unix","windows"],"created_at":"2024-12-19T13:29:34.746Z","updated_at":"2025-08-20T16:34:29.911Z","avatar_url":"https://github.com/sebres.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n          _____   _  ___ _         _   __  __         _ \n         |_   _|_| |/ __| |___  __| |_|  \\/  |___  __| |\n           | |/ _| | (__| / _ \\/ _| / / |\\/| / _ \\/ _` |\n           |_|\\__|_|\\___|_\\___/\\__|_\\_\\_|  |_\\___/\\__,_|\n           v.8.6.7-03                         2018/12/03\n                                                       \n\n## TclClockMod: the [fastest, most powerful](#performance-) Tcl clock engine written in C\n\nWhat is this ?\n==============\n\nThis is the source distribution of the Tcl clock extension: the [faster](#performance-) \nTcl-module for the replacement of the standard \"clock\" ensemble of tcl.\n\nYou need to have your Tcl core compiled also.\n\nThis extension is a freely available open source package. You can do\nvirtually anything you like with it, such as modifying it, redistributing\nit, and selling it either in whole or in part.  See the \"license.terms\"\nfile in the top-level distribution directory for complete information.\n\nNow this clock-engine is a part of Tcl 8.7 / 9.0.\n\nHow to compile ?\n----------------\n\nOnly Unix-like and Windows platforms are supported at the moment. Depending\non your platform (Unix-like or Windows) go to the appropriate directory\n(unix or win) and start with the README file. Macintosh platform is supported\nsimilar way the Tcl core does it also.\n\nHow to use ?\n------------\n\n```tcl\npackage require tclclockmod\nclock format now\n```\n\nPerformance ?\n-------------\n\nCurrent performance increase (in comparison vs the tcl-core clock):\n\nFunction | Performance increase | tclclockmod | tcl8.6-clock\n-------- | -------------------- | ----------- | ------------\n`clock format` | 15 - 20 times faster | 0.27 - 4.28 µs/# | 5.45 - 45 µs/#\n`clock scan -format` | 40 - 70 times (up to 100 times faster \\*)\u003cbr/\u003e\u003csub\u003e\\* some previously extremely slow scans\u003c/sub\u003e | 0.44 - 1.72 µs/# | 21 - 120 µs/#\n`clock scan` (freescan) | 15 - 20 times | 0.51 - 5.84 µs/# | 12 - 77 µs/#\n`clock add` | 50 - 90 times | 0.31 - 0.68 µs/# | 15 - 45 µs/#\n\nThe difference is much more larger, if the tests are running multi-threaded with parasitic load.\n\n#### How the performance is measured:\n\nBoth tcl-core as well as tclclockmod has a file [tests-perf/clock.perf.tcl](./tests-perf/clock.perf.tcl) which can be used to compare the execution times of original clock and tclclockmod. It can be also simply performed from the tclsh, with and without loading of the module.\u003cbr/\u003e\nHere is a diff illustrating that (which amounted to 112x speed-up):\n```diff\n  % timerate -calibrate {}\n  % clock scan \"\" -timezone :CET; clock scan \"\" -gmt 1; # warming up\n  % timerate { clock scan \"2009-06-30T18:30:00 CEST\" -format \"%Y-%m-%dT%H:%M:%S %z\" -gmt 1 }\n- 66.1134 µs/# 15118 # 15125.5 #/sec 999.502 net-ms\n+ 0.587048 µs/# 1612463 # 1703438 #/sec 946.593 net-ms\n```\n\nTcl compatibility:\n=================\n\nAlthough this clock-ensemble version is almost 100% compatible (except of some \nchanges of the logic as regards the bug-fixing), but you should nevertheless\ntest it with your application.\n\nThe module is currently usable with latest Tcl 8.6th version (\u003e= 8.6.6), but can\nbe used also with previous versions since 8.6.0 (note that some packages like \n\"msgcat\" should be upgraded in this case).\n\nSince [TIP 688](https://core.tcl-lang.org/tips/doc/trunk/tip/688.md) (commits [GH/tcl/e736133f9c72](https://github.com/tcltk/tcl/commit/e736133f9c72a69186f1d6845b5fb52de03c23ab) or [CORE/tcl/7137ea11e9e343f6](https://core.tcl-lang.org/tcl/info/7137ea11e9e343f6)) this is a part of Tcl 8.7 / 9.0 and therefore fully compatible to newest core-tcl now, excepting few things (like `clock configure` -\u003e `tcl::unsupported::clock::configure`).\n\nCode status (CI):\n-----------------\n\n* GH-actions:\n  - [![CI-nix](https://github.com/sebres/tclclockmod/actions/workflows/ci-nix.yml/badge.svg)](https://github.com/sebres/tclclockmod/actions/workflows/ci-nix.yml)\n\nContact:\n--------\n\n### Bugs, feature requests, discussions?\nUse github [issue-tracker](https://github.com/sebres/tclclockmod).\n\n### You just appreciate this program:\nsend kudos to the original author ([Sergey G. Brester](mailto:github@sebres.de)).\n\nThanks:\n-------\n\n- FlightAware for the inspiration for me to write it (due to their bounty-program).\n- TCT and all other contributors for the great language (long live Tcl!).\n\n\nLicense:\n--------\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebres%2Ftclclockmod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebres%2Ftclclockmod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebres%2Ftclclockmod/lists"}