Calculating the Maximum Execution Time of Real-Time Programs