I did waste a lot of time at university.) If the if clause is first, the two clauses are separated by a comma. There is no comma if the result clause is first.