In this work we present a protocol for a self- synchronized duty-cycling mechanism in wireless sensor net- works with energy harvesting capabilities. The protocol is im- plemented in Wiselib, a library of generic algorithms for sensor networks. Simulations are conducted with the sensor network simulator Shawn. They are based on the specifications of real hardware known as iSense sensor nodes. The experimental results show that the proposed mechanism is able to adapt to changing energy availabilities. Moreover, it is shown that the system is very robust against packet loss.Postprint (published version