method

new

v1_9_1_378 - Show latest stable - Class: Time
new()
public

Returns a Time object initialized to the current system time. Note: The object created will be created using the resolution available on your system clock, and so may include fractional seconds.

a = Time.new      #=> 2007-11-19 07:50:02 -0600
b = Time.new      #=> 2007-11-19 07:50:02 -0600
a == b            #=> false
"%.6f" % a.to_f   #=> "1195480202.282373"
"%.6f" % b.to_f   #=> "1195480202.283415"