time.to_f â float
Instance Public methods
Returns the value of time as a floating point number of seconds since the Epoch.
t = Time.now "%10.5f" % t.to_f #=> "1270968744.77658" t.to_i #=> 1270968744
Note that IEEE 754 double is not accurate enough to represent the number of nanoseconds since the Epoch.
Please login to continue.