     }
     
     func resume() {
+        guard suspended else { return }
+        
         setTimer()
         dispatch_resume(timer)
+        suspended = false
     }
     
     func suspend() {
+        guard !suspended else { return }
+        
         dispatch_suspend(timer)
+        suspended = true
     }
     
     private func setTimer() {


final class GCDTimer {
    private let timer: dispatch_source_t
    var interval: Double {
        didSet { setTimer() }
    }

    }
    
    deinit {
        if suspended { resume() }
        dispatch_source_cancel(timer)
    }
}
