You will want a seperate thread to verify the elapsed time from the moment the boolean is set. That is to allow your program to continue "normally" while the delta time is being calculated. If you implement the solution using a loop, make sure you do have a delay, otherwise that loop will hog down the CPU and your regular program will not continue "normally".
RayR