and print time @ end of function work(num)