How to pass float value where datatype is CMTime?
You can use one of the CMTimeMake...()
functions. You have to supply a time point and a timescale value. The former is a 64-bit integer; you can just truncate or round your float
to convert it to an integer, or use a necessarily high timescale:
CMTime tm = CMTimeMake(53425, 10000); // @ 5.3425 sec
In Swift 4.2 and Xcode 10.1
CMTimeMake(value: 53425, timescale: 10000)// @ 5.3425 sec