int lastSec = second(); void draw() { if (lastSec!=second()) { drawClock(); lastSec=second(); } }