{"id":19540873,"url":"https://github.com/dimpiax/richtimer","last_synced_at":"2026-04-16T17:04:46.142Z","repository":{"id":62452930,"uuid":"55232689","full_name":"dimpiax/RichTimer","owner":"dimpiax","description":"RichTimer – it's easy NSTimer managment and compact visual appearance","archived":false,"fork":false,"pushed_at":"2017-09-24T17:48:35.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T11:18:12.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/dimpiax.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":"2016-04-01T13:02:30.000Z","updated_at":"2017-09-24T17:48:37.000Z","dependencies_parsed_at":"2022-11-01T23:45:48.814Z","dependency_job_id":null,"html_url":"https://github.com/dimpiax/RichTimer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimpiax%2FRichTimer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimpiax%2FRichTimer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimpiax%2FRichTimer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimpiax%2FRichTimer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimpiax","download_url":"https://codeload.github.com/dimpiax/RichTimer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240795006,"owners_count":19858725,"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-11-11T03:07:41.377Z","updated_at":"2026-04-16T17:04:46.111Z","avatar_url":"https://github.com/dimpiax.png","language":"Shell","readme":"# RichTimer\n\n[![Build Status](https://travis-ci.org/dimpiax/RichTimer.svg)](http://travis-ci.org/dimpiax/RichTimer)\n[![Version](https://img.shields.io/cocoapods/v/RichTimer.svg?style=flat)](http://cocoapods.org/pods/RichTimer)\n[![License](https://img.shields.io/cocoapods/l/RichTimer.svg?style=flat)](http://cocoapods.org/pods/RichTimer)\n[![Platform](https://img.shields.io/cocoapods/p/RichTimer.svg?style=flat)](http://cocoapods.org/pods/RichTimer)\n\nRichTimer – it's easy NSTimer managment and compact visual appearance.\nAccepts generic parameters for common functions\n\n## Usage\n\nThis extension of NSTimer has next useful functions:\n* once – timer fires after delay, not repeatable and accepts generic parameters or nothing \n* every – timer fires every delay, repeatable and accepts generic parameters or nothing \n\n- - - -\n\n    // once without parameters\n    Timer.once(1) {\n        print(\"I have fired after 1 second\")\n    }\n\n    // once with parameters\n    Timer.once(3, arguments: (magicNumber: 4, text: \"Passed text to closure\")) { magicNumber, text in\n        print(\"I have magic number: \\(magicNumber) and received this: \\(text)\")\n    }\n    \n    // every without parameters\n    Timer.every(10) {\n        print(\"I'm here for forever, visit every 10 second\")\n    }\n\n    // every with parameters and func\n    var count = 0\n    var timer: NSTimer!\n    \n    func didFiredTimer(repeatCount: Int) {\n        count += 1\n        if count == repeatCount {\n            print(\"Timer will be invalidated!\")\n            timer.invalidate()\n        }\n    }\n    \n    timer = Timer.every(2, arguments: 4, completion: didFiredTimer)\n\n## Requirements\n\nUpdated to Swift 4\n\n## Installation\n\nRichTimer is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"RichTimer\"\n```\n\n## Author\n\nPilipenko Dima, dimpiax@gmail.com\n\n## License\n\nRichTimer is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimpiax%2Frichtimer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimpiax%2Frichtimer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimpiax%2Frichtimer/lists"}