[PATCH] fix and optimize clock source update