let is a bash built-in for shell arithmentic
let "time_used = 1 - 1"
is equivalent to
(( time_used = 1 - 1 ))
however 0 in shell arithmetic means false and gives error exit status to avoid to exit with -e
|| true
can be added after command
(( 0 )) || true
let "time_used = 1 - 1" || true
|| true
allows to "bypass" -e
option for commands returning an error exit status however we can't distinguish a command that failed from a command that returns a false exit status. Other option can be to use arithmetic to return always a truthy value.
(( (time_used = 1 - 1) || 1))