[PATCH v2 21/35] common: Move clock functions into a new file