Saving energy is one of the principal challenges in wireless sensor networks. Dynamic voltage and frequency scaling (DVFS) is often used to reduce energy consumption in systems where sleep is not an option. We show that changing the CPU frequency introduces sudden changes in clock behavior, thereby affecting the time-keeping functionality. This anomalous phenomenon is observed in different sensor platforms and causes a loss of time synchronization among nodes that is unacceptable to applications such as structural health monitoring that require tightly synchronized clocks over extended periods. The paper provides experimental measurements of the clock value shift anomaly in three widely used wireless sensor platforms and its impact on clock synchronization costs. A general framework balancing the need to save energy against the need to keep clocks synchronized is developed. Our system is implemented and evaluated on a network of sensors deployed on a truss bridge and running a high-fidelity structural health monitoring application. Experimental measurements confirm the efficacy of the solution in saving energy while maintaining an acceptable level of synchronization.