IF and timer problem

Sounds like you want "If the condition is true and has been true for a specified time, do something.

    bool condition;
    static unsigned long startTimer = 0;
    if (!condition)
       startTimer = millis();
    else ​if (millis() - startTimer >= requiredTrueTime)
    ​{
      // 'condition' has been true for requiredTrueTime
      ​// Do something
    }