This should be:  (double)(startTime.nsecsElapsed() / 1000000)

Other devs might complain about the "magic number" 1000000, saying it should be a variable like NSECS_PER_MSEC so that its purpose is more clear.  My opinion is that scaling units of seconds is not true "magic" since the purpose of the power of ten is trivially clear.