function, Does void x() need

Pressed and activate get set afresh every time you call relayDelay, so you always call t1.reset. Make them global, or better, static. I'm not sure you need them both either, try it without activate. Put the digitalWrite back in the function and drop the return. Any better?