2016-11-16 145 views

回答

0

t = DateTime.now.to_f * 1000; t.round

+0

嗯,爲什麼呢? 'to_f'的確給了毫秒。 'Time.now.to_f => 1479362805.960119'。點後有6位數字,但你需要前三位,因此'* 1000'和'round' –

相關問題