method

to_f

v1_8_6_287 - Show latest stable - Class: Time
to_f()
public

Returns the value of time as a floating point number of seconds since epoch.

   t = Time.now
   "%10.5f" % t.to_f   #=> "1049896564.13654"
   t.to_i              #=> 1049896564