As long as it takes for the moisture content of the walls, floors, carpet to drop to a suitable level.
That level might be in the fine print of your insurance, or pick a number based on sampling at a known dry location in the home or area.
There exist specialist probes like this to read the moisture content level. These are intended for carpets - the prongs will leave dents in walls etc.
Don't trust your fingers to tell you if something is damp or dry - they can be completely misleading, leaving you with hidden damp in the future.

Search terms used to find these: moisture probe carpet flood