Added time interface to avoid breaking of millis() during sleep mode