Optimez time functions.