cpp: Move Timestamp logic out of header