added macro to time functions