change time measure function