DispatchTime.now() is a double. You cannot add a float and a double value together. (A small explanation about why can’t you add values with different types can be found here).
Replace
var time: Float = 2.2
with
var time: Double = 2.2
And it will work fine.