One problem is that NSEC_PER_SEC
is 1,000,000,000, so CMTimeMake(timeInSecond, NSEC_PER_SEC)
is going to be a really tiny number (unless timeInSecond
is ridiculously huge) - in fact, it will be arbitrarily close to zero, which is exactly what you are experiencing.
Just to be clear: CMTimeMake
defines a rational number. You are giving a numerator and a denominator. If your denominator is huge, the rational number will be tiny.