Convert to using time instead of interval