Perform Function, If Not Clicked In 3 Seconds

I have game that presents the user with a random number (between 1 and 6). Upon tapping on the number the game generates a new number. If the new number is the same as the previous number, and the user tapps on it, the player looses the game. there is also a timer that causes the player to loose the game if they do not tapp the current number within 3 seconds.

I would like it to be that if a duplicate number appears, the player must not tapp it, for three seconds, and then a new number generates, and the proccess starts again.

What I am looking for is some sort of ‘IfNotClickedIn3Seconds’ function. Thanks.

May be you search for something like this?

float remainTime;
bool count3Seconds;

private void BeginCount3Seconds()
{
   remainTime = 3;
   count3Seconds = true;
}

private void StopCount3Seconds()
{
   count3Seconds = false;
}

private bool IfNotClickedIn3Seconds()
{
   remainTime -= Time.deltaTime;
   if (remainTime < 0)
   {
      return true;
   }
   else
   {
      return false;
   }
}

private void Update()
{
   if (count3Seconds)
   {
      if (IfNotClickedIn3Seconds)
      {
         PerformYouFunc();
         StopCount3Seconds();
      }

   }
}

(somewhere (after number generation may be) you need call BeginCount3Seconds())

I solved it, by running a single timer.
I set a bool variable where if true, something will happen if the timer reaches 0.01 seconds. If the bool is false, the timer will still reach 0.0 seconds, and time out the player.