calculate_time_window
