Skip to content


Repository files navigation

SwiftDelayer Build Status CocoaPods Compatible GitHub license

Swift Delayer

Just a simple wrapper for the GCD delay functionality written in Swift


Get SwiftDelayer on CocoaPods, just add pod 'SwiftDelayer' to your Podfile and then run pod install


import SwiftDelayer

Delayer.delayOnMainQueue(seconds: 2.0){
    print("I was delayed for 2 seconds :-)")            

You can also delay on a specific Queue

import SwiftDelayer

let backgroundQueue = dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0)

Delayer.delayOnQueue(seconds: 3.0, queue: backgroundQueue){
    print("I was delayed for 3 seconds :-)")            


Chris Jimenez -, @chrisjimeneznat