             }
             
             progressBar.strokeEnd = currentProgress
-            progressText.string = "\((Int)(currentProgress * 100))"
+            progress = currentProgress
+            
+            countingStartTime = NSDate.timeIntervalSinceReferenceDate()
+            countingStartValue = oldValue
+            
+            if displayLink == nil {
+                displayLink = CADisplayLink(target: self, selector: #selector(updateProgressText))
+                displayLink?.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSDefaultRunLoopMode)
+            }
+        }
+    }
+    @IBInspectable var duration: Double = 0.25 {
+        didSet {
+//            progressBar.duration = duration
         }
     }
     

//

import UIKit

@IBDesignable class CircularProgress: UIView {
    @IBInspectable var progressBarColor: UIColor = UIColor(red: 33/255.0, green: 150/255.0, blue: 243/255.0, alpha: 1) {
        didSet {
            progressBar.strokeColor = progressBarColor.CGColor
        }
    }
    @IBInspectable var progressRingColor: UIColor = UIColor(red: 187/255.0, green: 222/255.0, blue: 251/255.0, alpha: 1) {
        didSet {
            progressRing.strokeColor = progressRingColor.CGColor
        }
    }
    @IBInspectable var fillColor: UIColor = UIColor.clearColor() {
        didSet {
            fillBackground.fillColor = fillColor.CGColor
        }
    }
    @IBInspectable var textColor: UIColor = UIColor(red: 47/255.0, green: 125/255.0, blue: 183/255.0, alpha: 1) {
        didSet {
            progressText.foregroundColor = textColor.CGColor
        }

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.initPropertiesDefaultValue()
        self.initUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        self.initPropertiesDefaultValue()
        self.initUI()
    }
    
    // MARK: - Override Methods
    override func layoutSubviews() {
        
        super.layoutSubviews()
        
        let rectInCenter = CGRect(origin: CGPoint(x: progressWidth / 2, y: progressWidth / 2), size: CGSize(width: progressLength, height: progressLength))
