Flowdock
to_f() public

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

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

Note that IEEE 754 double is not accurate enough to represent nanoseconds from the Epoch.

Show source
Register or log in to add new notes.