The amount of time is based directly on the cost, so to say "not only cost" is somewhat misleading. And your example city is also misleading - yes, it's 2 turns for the first Longbow/Musketman, but the second would finish in a single turn for the Longbow, while still take 2 turns for the Musketman. As would the 3rd and 4th.
Bh
Bh