Check out example codes for "unity make timer". It will help you in understanding the concepts better.

Code Example 1

function Update() 
 {     
	timeLeft -= Time.deltaTime;     
 	if ( timeLeft < 0 )     
 	{         
 		GameOver();     
 	} 
 }

Code Example 2

float timeLeft = 30.0f;
     
     void Update()
     {
         timeLeft -= Time.deltaTime;
         if(timeLeft < 0)
         {
             GameOver();
         }
     }

Learn ReactJs, React Native from akashmittal.com