Timelimit is better controlled:

The code checks for one of those variables to get the max elaps time
for the compuation (in seconds)

    HYDROC_MAXTIME
    BRIDGE_MPRUN_MAXTIME
    BRIDGE_MSUB_MAXTIME

Furthermore, it checks also the content of HYDROC_START_TIME (the
value of date +%s) which should be set at the beginning of the script
to make sure that the compute time is the proper one, should the
actions before laucnhing the code be (too) long.
stop at time limit without a deadlock ...
Refine comments on time limit