Here is a little modified version of the BUD Switch I previously posted.
It is almost the same exact design, however, this design is pretty small and only requires 4 blocks. It's made for survival much like the other bud switch and is very cheap to create. Keep in mind, I do use a sticky piston.
To create the clock just click on the spoiler below!