How to add simple cooldown on Button

need some help,
my question is how to add cooldown when attack on button,
this my button attack script

	public void BStromAttack()
	{
		if(charState == CharacterState.Idle && !isMoving)
		{
			isPaused = false;
			BStorm.Play ();
			animator.SetTrigger ("BStorm");
			StartCoroutine (COMovePause (5f));
			charState = CharacterState.Idle;
		}
	}

please help me,

You can use variable to record the last time you fired, and Unity system variable “Time.time” which describes how much time in seconds has passed since the game start.

Before firing, you check if you can do this, checking if summed up “last fired time” and “cooldown time” are less then “Time.time”. Something like that:

public float fireCooldown = 1.0f;
float lastTimeFired = -100.0f; // initial value of this should be much less than zero

public void BStromAttack()
{
    bool canFire = (charState == CharacterState.Idle);
    canFire = canFire && !isMoving;
    canFire = canFire && (Time.time > lastTimeFired + fireCooldown);
    if(canFire)
    {
        isPaused = false;
        BStorm.Play ();
        animator.SetTrigger ("BStorm");
        charState = CharacterState.Idle;
	    lastTimeFired = Time.time;
    }
}