{"id":15481569,"url":"https://github.com/cnkcq/globaltimer","last_synced_at":"2025-03-28T14:32:03.017Z","repository":{"id":56912791,"uuid":"119037740","full_name":"CNKCQ/GlobalTimer","owner":"CNKCQ","description":"A simple to use library that gets around a load of problems that arise when you start trying to do much inside 'loop'. ","archived":false,"fork":false,"pushed_at":"2020-01-17T08:02:50.000Z","size":1102,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T05:15:21.753Z","etag":null,"topics":["loop","objective-c","timer-clock"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/CNKCQ.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}},"created_at":"2018-01-26T10:17:41.000Z","updated_at":"2020-02-20T10:30:38.000Z","dependencies_parsed_at":"2022-08-20T20:50:24.239Z","dependency_job_id":null,"html_url":"https://github.com/CNKCQ/GlobalTimer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNKCQ%2FGlobalTimer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNKCQ%2FGlobalTimer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNKCQ%2FGlobalTimer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNKCQ%2FGlobalTimer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CNKCQ","download_url":"https://codeload.github.com/CNKCQ/GlobalTimer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246046161,"owners_count":20714915,"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":["loop","objective-c","timer-clock"],"created_at":"2024-10-02T05:04:57.216Z","updated_at":"2025-03-28T14:32:02.991Z","avatar_url":"https://github.com/CNKCQ.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GlobalTimer\n\n[![CI Status](http://img.shields.io/travis/wangchengqvan@gmail.com/GlobalTimer.svg?style=flat)](https://travis-ci.org/wangchengqvan@gmail.com/GlobalTimer)\n[![Version](https://img.shields.io/cocoapods/v/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer)\n[![License](https://img.shields.io/cocoapods/l/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer)\n[![Platform](https://img.shields.io/cocoapods/p/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer)\n\n![images](https://user-images.githubusercontent.com/8440220/35437284-a5b4d8e6-02cc-11e8-92c3-d349a60a0e5e.jpeg)\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n* Xcode\n* Objective-C\n\n## Features\n\n- [x] start a loop with an event.\n- [x] pause a specific loop.\n- [x] active a specific loop.\n- [x] remove a specific loop.\n- [x] update a loop with a new interval\n\n## Installation\n\nGlobalTimer is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'GlobalTimer'\n```\n\n## Api\n```Objective-C\n+ (instancetype _Nonnull )shared;\n\n- (void)scheduledWith: (NSString  * _Nonnull )identifirer timeInterval: (NSTimeInterval)interval repeat:(BOOL)repeat block:(GTBlock _Nonnull )block userinfo:(NSDictionary * _Nullable)userinfo;\n\n- (void)updateEventWith: (NSString  * _Nonnull )identifirer timeInterval: (NSTimeInterval)interval repeat:(BOOL)repeat block:(GTBlock _Nonnull )block userinfo:(NSDictionary * _Nullable)userinfo;\n\n- (void)pauseEventWith: (NSString *_Nonnull)identifirer;\n\n- (void)removeEventWith: (NSString *_Nonnull)identifirer;\n\n- (void)activeEventWith:(NSString *_Nonnull)identifirer;\n\n- (NSArray\u003cNSString *\u003e *_Nonnull)eventList;\n```\n\n## :book: Usage\n\n```Objective-C\n    [[GTimer shared] scheduledWith:@\"first\" timeInterval:2 repeat:YES block:^(NSDictionary *userinfo) {\n        NSLog(@\"🇺🇸%@\", userinfo[@\"test\"]);\n    } userinfo:@{@\"test\": @\"ok\"}];\n    \n    [[GTimer shared] scheduledWith:@\"second\" timeInterval:5 repeat:YES block:^(NSDictionary *userinfo) {\n        NSLog(@\"🌺%@\", userinfo[@\"cnkcq\"]);\n    } userinfo:@{@\"cnkcq\": @\"king\"}];\n    [[GTimer shared] scheduledWith:@\"dog\" timeInterval:5 repeat:YES block:^(NSDictionary *userinfo) {\n        NSLog(@\"🐶%@\", userinfo[@\"dog\"]);\n    } userinfo:@{@\"dog\": @\"旺财\"}];\n    [[GTimer shared] scheduledWith:@\"fourth\" timeInterval:10 repeat:YES block:^(NSDictionary *userinfo) {\n        NSLog(@\"🐱%@\", userinfo[@\"cat\"]);\n    } userinfo:@{@\"cat\": @\"咪咪\"}];\n\n```\n\n```Objective-C\n    [[GTimer shared] pauseEventWith:@\"dog\"];\n        NSLog(@\"%@\", [[GTimer shared] eventList]);\n    [[GTimer shared] activeEventWith:@\"dog\"];\n    [[GTimer shared] removeEventWith:@\"fourth\"];\n```\n## Reprensent\n![ti](https://user-images.githubusercontent.com/8440220/35437059-c17cdb56-02cb-11e8-9a3c-b3a5cec90be8.jpg)\n## Author\n\nwangchengqvan@gmail.com, chengquan.wang@ele.me\n\n## License\n\nGlobalTimer is available under the MIT license. See the LICENSE file for more info.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnkcq%2Fglobaltimer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnkcq%2Fglobaltimer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnkcq%2Fglobaltimer/lists"}