I can’t seem to figure out how to convert TimeInterval to CMTime. Does it need more than just a simple conversion method?
1 Answer
You can write something like this:
let timeIntvl: TimeInterval = 60 let cmTime = CMTime(seconds: timeIntvl, preferredTimescale: 1000000) 1000000 represents that the preferred Timescale is 1μsec (1/1000000 sec).
When you convert between some types, there's usually no simple conversion method and you may need to find an initializer of the destination type.