 		borderWidth.fromValue      = frame.width * 0.3
 		borderWidth.toValue        = 0
 		borderWidth.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
-		borderWidth.beginTime      = CACurrentMediaTime() + 0.29
+		borderWidth.beginTime      = layer.lth_currentMediaTime + 0.29
 		
 		return borderWidth
 	}

		group.duration       = 0.1
		group.animations     = [bounds, cornerRadius]
		group.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
		group.beginTime      = CACurrentMediaTime() + 0.23
		
		return group
	}

	}
	
}

fileprivate extension CALayer {
	
	/// Converts `CACurrentMediaTime()` to the layer's local time.
	///
	/// There seems to be an issue where over-time animations can get delayed. The delay can be multiple seconds and forever-growing and this is due to the fact that each `CALayer` and `CAAnimation` instance has its own local concept of time, which may differ from global time — `CACurrentMediaTime()` is global.
	///
	/// - Authors:
	///     - Thanks to [@alexandre-g](https://github.com/alexandre-g) for opening this [issue](https://github.com/rolandleth/LTHRadioButton/issues/6) and helping find the fix for it.
	///     - Thanks to [@kgaidis](https://github.com/kgaidis) for his fix in [this pull request](https://github.com/airbnb/lottie-ios/pull/618) for Lottie.
	var lth_currentMediaTime: CFTimeInterval {
		return convertTime(CACurrentMediaTime(), from: nil)
	}
	
}
