Run something from the command line with a timeout... "run for" N seconds.