OnTriggerStay Wait for secaonds

I’m making a little game where if you go into certain areas there is a chance of being attacked, a bit like in Final Fantasy. How do I make it so that when I’m in the area, that it’s a second, I randomly see if you’re being attacked? I have written this, but it runs constantly, so you would be attacked all the time. Any suggestions on how to set a timer?

    private void OnTriggerStay(Collider other)
    {
        if (other.gameObject.tag == "Grass")
        {
            if (Random.Range(1, 101) <= 5)
            {
                print("Found an enemy");
            }
        }
    }

Here’s how I’d do it:

using System.Collections;
using UnityEngine;

public class Trigger : MonoBehaviour
{
    bool entered;

    private void OnTriggerEnter(Collider other)
    {
        entered = true;
        StartCoroutine(Delay(1));
    }

    private void OnTriggerExit(Collider other)
    {
        entered = false;
    }

    IEnumerator Delay(int delayTime)
    {
        yield return new WaitForSeconds(delayTime);
        if (entered)
        {
            print("Still in area");
        }
    }
}

When you enter an area, set a flag then start the coroutine. Providing you haven’t left the area, the coroutine can then trigger the code to determine if an enemy appears. I’ve added a parameter so that you can choose delay time.