Move towards using a dedicated `Duration` type.