This paper adopts a method of linear fitting to create a model of clock drift rate, and uses this drift rate to adjust time and analyze stability. The paper makes three major contributions to this research area. Firstly, the slave node uses local time and the arrival timestamps, from the reference server, to create offset trend equation, and to retrieve the drift rate of slave node. Secondly, the paper analyzes the impact of roundtrip delay on clock synchronization, and presents a strategy of fitting offset to adjust time, which can improve the stability of clock synchronization more effectively, comparing to the instantaneous offset. Finally, client software of clock synchronization developed by this project not only can display the trend graph of roundtrip delay and offset trend equation at real time, but also can adjust time on the strategy of fitting offset or instantaneous offset.