Streamline time computation

No functional change.