Implemented Clock, reworked Time and Timer accordingly. Should be backward-compatible. (Fix #798)