Stop a Function and Run another Function?

I have function that i want to run every 15 minutes.
I am entering numbers from the keyboard. While entering the numbers and if 15 minutes have passed
I want my sketch to stop what it is doing and start the function that it supposed to run after 15 minutes.

How can i do this?

Save the value of millis() when input starts in an unsigned long variable then, each time through loop() check whether 15 minutes have passed run the second function

if (millis() - startTime >= 1000UL * 60 * 15)
{
  //code or function to run after 15 minutes
}

The demo Several Things at a Time is an extended example of the use of millis() for timing.

If you are receiving serial data you may also be interested in the examples Serial Input Basics which should probably be very suitable for your described requirement.

...R