How long does it take to restart a turbofan engine inflight?
It can take from a few seconds to eternity. If the core cools down, the engine might lock up.

Windmilling starts are only possible if the aircraft is flying fast and low enough. It will assist the startup process, but needs additional help from the starter or bleed air, typically below 300 knots and above 20,000 ft. Details vary from type to type. If everything works as designed, a windmilling assisted restart is faster than a regular engine start.

The ability to restart in flight must be proven as part of the certification process. However, right after takeoff the speed is too low for a pure windmilling start, and an additional energy source is needed.