test time measure function