How exactly is this time measured? If I have a daily, time-controlled workflow that starts several subflows one after the other and takes longer than 40 minutes in total, but each subflow takes less than 40 minutes on its own - does the 40-minute limit count for the total duration of all subflows or is the time measured individually for each subflow?
The main task would be running more than 40 minutes so no, this will not work inside the max of 40 minutes.
Of course if you set it up a bit differently so the main task does not wait for subtasks that would allow you to be within the 40 minutes, but then you might overload the resources available depending on the load of course.