time in bash is a keyword, not the /usr/bin/time program, and its three-line real, user and sys report is a lot for a log file. You can shape it with one variable.
Set TIMEFORMAT and time prints your format instead:
TIMEFORMAT='backup took %1R seconds'
time rsync -a /srv/data/ /mnt/backup/data/
# backup took 42.3 seconds
%R is the wall-clock time, %U user CPU time and %S system CPU time. The digit sets the number of decimals, and l gives the long form with minutes, like %3lR.
Because it is a keyword, it can time a whole block or a pipeline at once:
time {
dump_database
compress_dump
}
I find that nicer than storing two timestamps and doing the sum yourself.
The report goes to stderr of the shell, not of the command. A redirect after the command, like time make 2> err.log, does not catch it; wrap it as { time make; } 2> timing.log instead. And TIMEFORMAT only affects the bash keyword; /usr/bin/time or command time has its own -f format.
Further reading: Bash manual: Pipelines (time), Bash manual: Bash Variables (TIMEFORMAT)