dimanche 1 février 2015

Checking if a variable is unchanged for X seconds C++

I'm trying to make an if statement that only starts when my variable hasn't changed for 20 seconds.


Does anybody now how I can accomplish this?



if (variable = 1) // && Doesn't change for 20 seconds.
{
//Action
}
else
{
//Action
}

Aucun commentaire:

Enregistrer un commentaire