method

subsec

v1_9_3_125 - Show latest stable - Class: Time
subsec()
public

Returns just the fraction for time.

The result is possibly rational.

t = Time.now        #=> 2009-03-26 22:33:12 +0900
"%10.9f" % t.to_f   #=> "1238074392.940563917"
t.subsec            #=> (94056401/100000000)

The lowest digit of to_f and subsec is different because IEEE 754 double is not accurate enough to represent the rational. The accurate value is returned by subsec.