     //
     public class func showWithDuration(_ duration: Double, title: String, animated: Bool = true) -> SwiftSpinner {
         let spinner = SwiftSpinner.show(title, animated: animated)
-        spinner.delay(seconds: duration) {
+        spinner.delay(duration) {
             SwiftSpinner.hide()
         }
         return spinner

    public class func showWithDelay(_ delay: Double, title: String, animated: Bool = true) {
        let token = UUID().uuidString
        delayedTokens.append(token)
        SwiftSpinner.sharedInstance.delay(seconds: delay, completion: {
            if let index = delayedTokens.index(of: token) {
                delayedTokens.remove(at: index)
                SwiftSpinner.show(title, animated: animated)

    
    // MARK: - Util methods
    
    func delay(_ seconds: Double, completion:()->()) {
        let popTime = DispatchTime.now() + Double(Int64( Double(NSEC_PER_SEC) * seconds )) / Double(NSEC_PER_SEC)
        
        DispatchQueue.main.after(when: popTime) {
