The invention discloses a clock synchronization device and a clock synchronization method. The device comprises a delay measurement module, a clock extraction module and a delay compensation module, wherein the delay measurement module is used for measuring a delay value of a message passing through a hardware delay node in real time, and transmitting the delay value to the delay compensation module; the clock extraction module is used for extracting a timestamp stamped before a precision time protocol message enters the hardware delay node when the message is determined to be the precision time protocol message, and transmitting the timestamp to the delay compensation module; and the delay compensation module is used for correspondingly performing delay compensation according to the received delay value and the received timestamp. Compared with the delay value, computed as a fixed value, of the precision time protocol (PTP) message passing through a certain hardware delay node, the delay value, measured in real time, of the PTP message passing through the certain hardware delay node is more precise. Therefore, corresponding timestamp regulation can be performed according to the precise delay value and the extracted timestamp, and the synchronization accuracy of the precision time protocol message is further improved.