add task time measuring function