{"id":13764055,"url":"https://github.com/VividCortex/multitick","last_synced_at":"2025-05-10T17:31:27.319Z","repository":{"id":12427563,"uuid":"15083144","full_name":"VividCortex/multitick","owner":"VividCortex","description":"A multiplexor for aligned time.Time tickers in Go","archived":false,"fork":false,"pushed_at":"2023-12-12T11:02:17.000Z","size":22,"stargazers_count":70,"open_issues_count":1,"forks_count":3,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-16T23:32:31.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/VividCortex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2013-12-10T16:47:26.000Z","updated_at":"2024-01-14T12:54:45.000Z","dependencies_parsed_at":"2024-06-19T00:15:14.524Z","dependency_job_id":"9fc5be6f-036c-4a4c-9adb-ab8e36283e66","html_url":"https://github.com/VividCortex/multitick","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VividCortex%2Fmultitick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VividCortex%2Fmultitick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VividCortex%2Fmultitick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VividCortex%2Fmultitick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VividCortex","download_url":"https://codeload.github.com/VividCortex/multitick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253453300,"owners_count":21911072,"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":[],"created_at":"2024-08-03T15:01:11.281Z","updated_at":"2025-05-10T17:31:27.024Z","avatar_url":"https://github.com/VividCortex.png","language":"Go","readme":"multitick\n=========\n\n![build](https://github.com/VividCortex/multitick/workflows/build/badge.svg)\n\nThis package is a wrapper around a single `time.Ticker` in the Go language, which\nprovides a way for lots of listeners to subscribe to a single set of ticks.  If\na subscriber is busy and can't receive a tick, it will be discarded; the\nimplementation is non-blocking.  Additionally, ticks can be aligned to a\nspecific boundary easily, which eliminates annoying code from your programs.\n\nWe use this functionality at [VividCortex](https://vividcortex.com/) to help\ncoordinate worker goroutines, driving them by passing them ticker channels.\nThis makes the workers more testable, by avoiding nondeterministic use of\n`time.Tick()` inside them.\n\nDocumentation\n=============\n\nPlease read the generated [package\ndocumentation](http://godoc.org/github.com/VividCortex/multitick).\n\nGetting Started\n===============\n\nInstall multitick in the usual way:\n\n    go get github.com/VividCortex/multitick\n\nAnd import it as usual:\n\n    import (\n        \"github.com/VividCortex/multitick\"\n    )\n\nTo use multitick, create a ticker with the desired interval and offset.\nFor example, to create a once-per-second ticker that will send at 750\nmilliseconds past the clock tick,\n\n    tick := multitick.NewTicker(time.Second, time.Millisecond*750)\n\nIf you want the ticker to start immediately instead of waiting, you can\npass a negative number as the second parameter.\n\nNow subscribe to ticks. Here's an example of starting worker routines with\nticker channels:\n\n    go someFunc(tick.Subscribe())\n    go otherFunc(tick.Subscribe())\n\nContributing\n============\n\nWe only accept pull requests for minor fixes or improvements. This includes:\n\n* Small bug fixes\n* Typos\n* Documentation or comments\n\nPlease open issues to discuss new features. Pull requests for new features will be rejected,\nso we recommend forking the repository and making changes in your fork for your use case.\n\nLicense\n=======\n\nCopyright (c) 2013 VividCortex, licensed under the MIT license.\nPlease see the LICENSE file for details.\n","funding_links":[],"categories":["工具库","Utilities","公用事业公司","实用工具","工具库`可以提升效率的通用代码库和工具`","實用工具","Utility"],"sub_categories":["查询语","HTTP Clients","Utility/Miscellaneous","实用程序/Miscellaneous","Advanced Console UIs","高級控制台界面","交流","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","Fail injection","高级控制台界面"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVividCortex%2Fmultitick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVividCortex%2Fmultitick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVividCortex%2Fmultitick/lists"}