meassure time, print summary, return exit status