Merge "Refactor time math to use Duration" into main