Efficiently carry out an action ever x seconds.

Oh ok so from what I understood I need to do this?

unsigned long currentMillis = millis();
                       while((currentMillis - previousMillis < interval)) 
                       {
                              // save the last time you reset the watchdog 
                              previousMillis += interval;   
                              wdt_reset();
                       }