sinusoidal frequency doubling
If the input is unmodulated, a PLL would be a sensible implementation.


Tunable oscillator generates 10 MHz sine
Comparator creates 10 MHz square wave
Digital frequency divider halves frequency
Signal is compared to input signal to generate control signal for the oscillator


It takes a few milliseconds for the PLL to start up, but if the input source is stable and your system isn't subjected to harsh temperature changes, it should remain stable and keep a fixed phase offset from the input frequency.