The game ends immediately and you will count your score based on the current values of time and gear.
Keep in mind that your Timer will change depending on your type of finish; if it's a CLEAN finish or NOT a clean finish it. Then, you skip end of turn phases and count score.