Flowdock
method

to_r

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: Time
to_r() public

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

t = Time.now
p t.to_r            #=> (1270968792716287611/1000000000)

This methods is intended to be used to get an accurate value representing the nanoseconds since the Epoch. You can use this method to convert time to another Epoch.

Show source
Register or log in to add new notes.