Convert from an input pulse frequency to output another in near real time?

MCU's don't lose clock time (i.e. timed events fall behind) just because some processing happens. That is the purpose of the several on chip hardware timers - they continue to run and keep track of time no matter what the processor is doing.

What you posted doesn't seem to have any response to reply #18 or the earlier #14 for that matter... just an explanation of why you want to do this...