Timer synchronization from cyril; clearer and safer timer register updates