All Projects → hemantasapkota → Gcdtimer

hemantasapkota / Gcdtimer

Licence: mit
Well-tested GCD Timer in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Gcdtimer

Speed Measure Webpack Plugin
⏱ See how fast (or not) your plugins and loaders are, so you can optimise your builds
Stars: ✭ 1,980 (+1006.15%)
Mutual labels:  timer
Pomd
🍅 A good old cli based Pomodoro timer with native notifications
Stars: ✭ 151 (-15.64%)
Mutual labels:  timer
Sc
Common libraries and data structures for C.
Stars: ✭ 161 (-10.06%)
Mutual labels:  timer
Schedule
Schedule timing task in Swift using a fluent API. (A friendly alternative to Timer)
Stars: ✭ 1,749 (+877.09%)
Mutual labels:  timer
Timer App
A simple Timer app for Mac
Stars: ✭ 2,047 (+1043.58%)
Mutual labels:  timer
Fluentdispatch
🌊 .NET Standard 2.1 framework which makes easy to scaffold distributed systems and dispatch incoming load into units of work in a deterministic way.
Stars: ✭ 152 (-15.08%)
Mutual labels:  dispatch
Arduino Timer
Non-blocking library for delaying function calls
Stars: ✭ 133 (-25.7%)
Mutual labels:  timer
Debuggingextensions
Host of debugging-related extensions such as post-mortem tools or WinDBG extensions
Stars: ✭ 177 (-1.12%)
Mutual labels:  timer
Travianz Legacy
Join our Discord Server: https://discordapp.com/invite/9fbJKP9 | New repo: https://github.com/iopietro/Travianz
Stars: ✭ 150 (-16.2%)
Mutual labels:  timer
Http Timer
🕐 Performance timings for HTTP requests
Stars: ✭ 156 (-12.85%)
Mutual labels:  timer
Amazing Time Picker
Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
Stars: ✭ 142 (-20.67%)
Mutual labels:  timer
Redux Devtools Dispatch
Dispatch your actions manually to test if your app reacts well.
Stars: ✭ 143 (-20.11%)
Mutual labels:  dispatch
Launchbar
LaunchBar Actions
Stars: ✭ 155 (-13.41%)
Mutual labels:  timer
Gores
👷 Redis-backed library for creating background jobs in Go. Placing jobs in multiple queues, and process them later asynchronously.
Stars: ✭ 137 (-23.46%)
Mutual labels:  dispatch
Clock
A low consumption, low latency support for frequent updates of large capcity timing manage
Stars: ✭ 161 (-10.06%)
Mutual labels:  timer
Flipdown
⏰ A lightweight and performant flip styled countdown clock
Stars: ✭ 136 (-24.02%)
Mutual labels:  timer
Bhoptimer
A bunnyhop timer plugin for Counter-Strike: Source, Counter-Strike: Global Offensive and Team Fortress 2.
Stars: ✭ 151 (-15.64%)
Mutual labels:  timer
Hgcircularslider
A custom reusable circular / progress slider control for iOS application.
Stars: ✭ 2,240 (+1151.4%)
Mutual labels:  timer
Schedex
Simple scheduling for Elixir
Stars: ✭ 173 (-3.35%)
Mutual labels:  timer
Ects
Elastic Crontab System 简单易用的分布式定时任务管理系统
Stars: ✭ 156 (-12.85%)
Mutual labels:  timer

Carthage compatible

GCDTimer

Well tested Grand Central Dispatch (GCD) Timer in Swift. Checkout the test file.

Usage

Long running timer

import GCDTimer

class Demo {

  init() {
    let timer = 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.
  }

}

Autofinishing timer

import GCDTimer

class Demo {

  init() {
    let timer = GCDTimer(intervalInSecs: 2)
    
    timer.Event = {
      timer.pause()
      //Process after finishing the timer
    }
    
    timer.start()
  }
  
}

Dispatch After - Delay

var index = 0
GCDTimer.delay(2) {
    index += 1
}

Installation

  • Add github "hemantasapkota/GCDTimer" to your cartfile
  • Execute carthage update

Example

The example shows how to use GCDTimer to periodically poll newly submitted items from Hacker News.

ExampleSS

Author

License

The MIT License (MIT)

Copyright (c) 2017 Hemanta Sapkota

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 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 THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].