How adding delay to a Time type variable

Hi,
i want to add a delay to a Time variable to check when the delay is expired but i d'ont know do to this :
Thank's for your help
Sébastien

Time clk;
Time clk2;
int MyHour = 10;
int MyMin = 5;
int MySec =45;
boolean Begin = true;
void loop()
{
clk = rtc.getTime(); --> here the date is for exemple 02.04.2013 20:10:20
if ( Begin ==true )
{
clk2 = clk + MyHour +MyMin +MySec ; --> after that i want the date of clk2 is 03.04.2013 06:06:05
Begin = false;
}
if (clk > clk2 )
{
//Delay is expired TODo here
Begin = true;
}

}

No clue exactly what you want to do, but couldnt you time a delay by recording and comparing to instances of millis()?

EDIT: I see youre still editing the post. Ill be back in a minute than

Hi ,
i read that millis() is cleared every 50 day, it is possible to force it manualy to after my delay ?

No not that Im aware of, unless you can employ a manual reset of the Arduino, but im not even sure if that will reset the millis function. Of course, the maximum number is known, so if the second number is smaller than the first, you could still calculate the delay. Or take care of it if youre running out of millis().

But it will eventually rollover yes. 50 days is not enough for your intentions?

EDIT: Its 49 days :). But look here, I think youre answer might be in it:

http://www.cmiyc.com/blog/2012/07/16/arduino-how-do-you-reset-millis/

Important question is whether you really need a 'date' type of time keeping, or a general delay which can be kept with millis(). So, simply time passed, or the actual day/month etc as well?

i read that millis() is cleared every 50 day, it is possible to force it manualy to after my delay ?

As the link explains, as long as you subtract the previous time from millis() there is no problem with rollover.

What is the longest delay are you trying to implement ?
If this is for an alarm clock type of delay then you would be better comparing the date/time from the RTC with your required end time

Thank's a lot for your reply,
I will do my program with the millis() fonction.
Seb

I still think that you would be better to use the time from the RTC and compare your delay end time with it if the delay is going to be longer than one second. Apart from anything else it will be more accurate.