Timer / count down thing

That code has no timing elements in it. I guess I didn't understand what you want to achieve. Can you explain it again?

Please translate the comments to English or at least use English variable names with explicit names (not "i", "f" and "t"). The variable "t" is tested several times against the value 2 but it never is set to that value.
My current understanding of your code is, that "t" is some kind of state, "i" is the current digit to be entered and "f" marks the number of unsuccessful tries to enter a valid code.
If I didn't miss anything, you can get rid of all delay() calls in your sketch. Timing stuff is easily done using millis(). Just save the value when a period starts and check against the stored value to see how much time went by.