Clock conversion

Should be tested.