Time Synchronization in Wireless Sensor Networks Using Max and Average Consensus Protocol. (28th March 2013)