Ruby 2.1.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Timeクラス > tv_usec

instance method Time#tv_usec

usec -> Integer[permalink][rdoc]
tv_usec -> Integer

時刻のマイクロ秒の部分を整数で返します。


t = Time.local(2000,1,2,3,4,5,6)
p "%10.6f" % t.to_f   #=> "946749845.000006"
p t.usec              #=> 6