method

new

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

Document-method: now

Synonym for Time.new. Returns a Time object initialized tot he current system time.

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      #=> Wed Apr 09 08:56:03 CDT 2003
   b = Time.new      #=> Wed Apr 09 08:56:03 CDT 2003
   a == b            #=> false
   "%.6f" % a.to_f   #=> "1049896563.230740"
   "%.6f" % b.to_f   #=> "1049896563.231466"