Clock functions.