solve rational_times