Você pode usar a opção -m
:
-m, --max-time <seconds>
Maximum time in seconds that you allow the whole operation to
take. This is useful for preventing your batch jobs from hang‐
ing for hours due to slow networks or links going down. See
also the --connect-timeout option.
If this option is used several times, the last one will be used.
Isso inclui o tempo de conexão, se você quiser especificá-lo separadamente, use a opção --connect-timeout
.