How to set delay between use of commands?

to around a 6second delay ?

on *:text:*command*:#: {
msg $chan hello all
}

and then for it to say "this command is on cool down" when used within 6seconds?