calculate and print runtime