Subject + 花 + 了 + Duration/Amount + Verb + Object
The verb 花 (huā) means 'to spend' when referring to time or money. It is used to express the amount of time or money consumed by an activity. A common pattern is 花了…的时间 (spent … amount of time), emphasizing the duration or cost involved.
我花了两个小时才找到那家餐厅。
Wǒ huā le liǎng gè xiǎoshí cái zhǎodào nà jiā cāntīng.
It took me two hours to find that restaurant.
这件衣服花了我三百块钱。
Zhè jiàn yīfú huā le wǒ sānbǎi kuài qián.
This piece of clothing cost me three hundred yuan.
别在这种事情上花太多时间了。
Bié zài zhè zhǒng shìqíng shàng huā tài duō shíjiān le.
Don't spend too much time on this kind of thing.