Time measurement now works as intended