Having a function for long Delay

I was hoping to have a void function that uses RTC module which creates a delay of 15 minute or 30 minute when called.

That's a much different requirement than you stated earlier. Simpler, in some ways. More complicated, in others.

If you are using a library that returns a Unix-time, you can, at the start of the function, get the current time. Then, use a while loop:

   int waitTime = 15;
   while(getUnixTime() - startTime < waitTime*60*1000UL)
   {
       // Twiddle your thumbs doing nothing
   }

This assumes that you used getUnixTime() to populate startTime, and that you write a function called getUnixTime() to return an unsigned long that contains the Unix time.