 
 // MARK: - Timer
 
-final public class CountDownTimerWrapper {
+final public class CountdownTimer {
     private let startTime: NSDate
     private let interval: NSTimeInterval
     private let duration: NSTimeInterval
-    private var next: ((NSTimeInterval) -> ())? = nil
-    private var completion: (() -> ())? = nil
+    private var next: ((NSTimeInterval) -> ())
+    private var completion: (() -> ())
     
     private var disposable: Disposable?
     

        startTime: NSDate = NSDate(),
        interval: NSTimeInterval = 1,
        duration: NSTimeInterval = 60,
        next: ((NSTimeInterval) -> ())? = nil,
        completion: (() -> ())? = nil)
    {
        self.startTime = startTime
        self.interval = interval

        self.completion = completion
    }
    
    public func start() {
        disposable = timer(interval, onScheduler: QueueScheduler.mainQueueScheduler).on(
            disposed: {
                self.completion()
            },
            next: {
                let overTimeInterval = $0.timeIntervalSinceDate(self.startTime)
                let leftTimeInterval = fabs(ceil(self.duration - overTimeInterval))
                self.next(leftTimeInterval)
                if leftTimeInterval <= 0 {
                    self.disposable?.dispose()
                }
            }
        ).start()
    }
    
    deinit {
        debugPrint("CountDownTimerWrapper: \(__FUNCTION__)")
    }
}

// MARK: - MutableProperty
