You can use timers (/help /timer) if you want to wait a specified amount of time, but it's usually better to use remote events (such as on NOTICE and on INVITE) to decide when to perform actions.