moving tic and toc
subquery for time