astropy/astropy — pull request #751 by lpsinger (2013-02-09 03:39:34+00:00)
Title: Make TimeDelta a unitful Quantity

astropy.time.TimeDelta inherits from astropy.units.Quantity, so that it
gains the .to() method and can be converted to seconds, hours, minutes,
etc.

Now you can do this:

>>> from astropy import time, units
>>> t1 = time.Time('2013-01-01T05:44:00', scale='utc', format='isot')
>>> t2 = time.Time('2013-01-01T06:45:00', scale='utc', format='isot')
>>> print (t2 - t1).to(units.min)
61.0 min