Add timing functions.