One of the important requirements of sensor networks is synchronization of the nodes. The importance of time in sensor networks causes the adversary tries to disturb time synchronization by altering and faking messages, delaying or replying them, compromising the nodes and sending false messages via them. Up to now, there is no method that is able to provide both synchronization and security needs of sensor networks simultaneously. In this paper, we suggest a method that is capable to provide precise synchronization, along with low communication and computational overhead, low convergence time and high security against internal and external attacks. Simulation and analytic results show the preference of our method compared to other available methods.