new macro for time measurement