Basic Timing Control Of Multiple Relays For Fire Station Alerting System

Thank you,
I did start with that example prior to posting here, but I do not understand how to actually have the function occur for the time set. In that example, they use long interval = 1000 as a time to compare a value to. When that value is above that 1000 then the led changes states if on then it goes off and vice versa. How can I take that interval value and apply it to my function... For example, could I do something like:

digitalWrite(ledPin, interval)

or something similar? I imagine I am probably way off target here on this. I do appreciate your reply.