Each time this parameter is referenced, the number of seconds
since shell invocation is returned. If a value is assigned to
SECONDS, the value returned upon subsequent references is the
number of seconds since the assignment plus the value assigned.
SECONDS is unset, it loses its special properties, even if it
is subsequently reset.
So whenever you want to time a piece of code with a timer that counts seconds, you may do
# code goes here
To print days and minutes from the
printf 'Time taken: %d days, %d minutes\n' "$(( t/86400 ))" "$(( t/60 - 1440*(t/86400) ))"