measure total time while task