You are expecting that end user will insert only one coin and await for the end of the process, and only after this moment to add another one. Coding blocking inline as this is not the recommended way; you should create a variable to store the cumulated value of credits and then run the DELAY_xxxxx_Minute() at an endless loop, by decrementing the time correspondent of the remaining time. Consider split the code into dedicated functions at different layers, each one for input/middle/output stages of the system. The above function not to discard it completely, can be used with few modifications as the coin detector, just it.