The present disclosure discloses an implantable medical device and a method for optimizing power consumption of the implantable medical device. The implantable medical device comprises a time synchronization unit, a decoder, and a processor. The time synchronization unit may receive a time signal transmitted by an atomic clock of a satellite using radio waves upon occurrence of an event. The event may be an internal command or an external command to activate the time synchronization unit. Further, the decoder may decode the time signal in order to obtain a time data. Further, the processor may generate a log of the time data and metadata. The metadata indicates physiological parameters of a patient. The implantable medical device further comprises an amplifier to amplify the time signal carrying the time data when strength of the time signal is in a predefined range.