declare time in c# code example
Example: simple time c#
public float timeLeft = 20.0f; //you can change this aswell
void Update()
{
timeLeft -= Time.deltaTime; //you can change this to just removing a number
if (timeLeft < 0)
{
//Method here
timeLeft += 20.0f; //change this to what you want
}
}