Every problem has its own time limit defined and on the basis it decides TLE cases. During submission even if user faces TLE, system should also tell the user the program running time. Although it can be limit up to 30 sec or 1 min at max. This way user can see how much optimisation is more needed. Also, is it hanging with some input or producing output by consuming time more than allowed.
For example:
Problem A has required time: 1.5s
Problem A has Timeout: 30s
Problem A solution took: 5s
Now user knows, it is working correctly but taking 3.5s more than the allowable time.