update clock code