Brian Candler wrote in post #942410:
> Alternative:
>
>>> require 'time'
> => true
>>> t1 = Time.parse("12:35:10.000757")
> => Mon Sep 20 12:35:10 +0100 2010
>>> t2 = Time.parse("12:35:10.000759")
> => Mon Sep 20 12:35:10 +0100 2010
>>> t2 - t1
> => 2.0e-06

If you got the ruby time, you can use the gem 'time_diff' to get the
time difference in a useful format like year, month, week, day, hour,
minute, second

https://rubygems.org/gems/time_diff

-- 
Posted via http://www.ruby-forum.com/.