Fix timing functions.