sms based door lock

unsigned long last_check = millis();

loop()
{
if (millis() - last_check > 30000)
{
// do the check
last_check = millis();
}
}

This code actually help me... but instead of 30000 millis interval I rather prefer 1000 which is give exactly what I want..
The logic you gave me is what I really need. If I'll have a problem regarding to this matter.. I'll post it. Thank you Monsieur