You can combine time (does the timing) with the timeout utility from coreutils (does the killing).
time
timeout
Example:
$ time timeout 1 sleep 4 Command exited with non-zero status 124 0.00user 0.00system 0:01.00elapsed 0%CPU (0avgtext+0avgdata 2012maxresident)