- Notifications
You must be signed in to change notification settings - Fork22
Well-tested GCD Timer in Swift
License
hemantasapkota/GCDTimer
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Well tested Grand Central Dispatch (GCD) Timer in Swift. Checkout thetest file.
import GCDTimerclassDemo{init(){lettimer=GCDTimer(intervalInSecs:20) timer.Event={println("Hello World") // Send some data to the server} timer.start() //Don't forget to pause the timer in the AppDelegate:applicationWillResignActive(application: UIApplication) method.}}
import GCDTimerclassDemo{init(){lettimer=GCDTimer(intervalInSecs:2) timer.Event={ timer.pause() //Process after finishing the timer} timer.start()}}
varindex=0GCDTimer.delay(2){ index+=1}
- Add
github "hemantasapkota/GCDTimer"to yourcartfile - Execute
carthage update
The example shows how to use GCDTimer to periodically poll newly submitted items from Hacker News.
The MIT License (MIT)
Copyright (c) 2023 Hemanta Sapkota
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
About
Well-tested GCD Timer in Swift
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
