convert time delta to int