     }
     
     private func setUpWithImageFrames(imageFrames: [AnimatedImageFrame]) {
+        previousTimestamp = nil
+        
         self.imageFrames = imageFrames
         
         imageFrame = imageFrames.first


final class JMAnimatedImageView: UIImageView {
    private var imageFrames: [AnimatedImageFrame]?
    private var displayLink: CADisplayLink?
    private var currentFrameRemainingDuration: NSTimeInterval = 0
    
    var repeats: Bool = false

    }
    
    // MARK: - CADisplayLink
    private weak var displayLink: CADisplayLink?
    private func setUpDisplayLink() {
        guard superview != nil && self.displayLink == nil else {
            return
        }
        
        let displayLink = CADisplayLink(target: self, selector: #selector(self.dynamicType.refresh(_:)))
        displayLink.paused = true
        displayLink.addToRunLoop(.currentRunLoop(), forMode: NSRunLoopCommonModes)
        self.displayLink = displayLink
    }
    
    private var previousTimestamp: CFTimeInterval?
