runtime: support clock switching