I am new to Ruby and am trying to get the precise time (down to a
of a second). For example, I did this:
now = DateTime.now
puts sprintf (“The current time is: %2d:%2d:%5.2f”, now.hour, now.min,
However, I discover that now.sec_fraction is always zero. Am I not using
Thanks in advance for any help.