it v N to-inf
This pattern is also used to indicate the amount of money or time needed to do something. Any noun group referring to an amount of money or a period of time can be used after the verb (cost or take).
It takes ages to get repairs done.
Although it cost a fortune to send men to the moon, it made good sense to me at the time.
It takes a long time to develop these technologies.
It takes a lot of money to decorate hospital wards at Christmas.
Alternatively, with take, the person or thing doing the action may be referred to with a prepositional phrase beginning with for which comes between the noun and the to-infinitive clause. This pattern is it v N for n to-inf.
It may take a few days for the medicine to become effective.