TT #24 · Parashas Noach · Second Aliyah · Passuk 7:10
And it came to pass after the seven days that the waters of the Flood were upon the earth.
Torah Temimah points to the derasha that Hashem “watched over” (mourned for) His world for seven days — an asmakhta for the seven days of mourning (Yerushalmi / parallel).
Sefaria — related Yerushalmi material
English: “After the seven days” — What is the nature of these seven days? That the Holy One, blessed be He, watched over (mourned for) His world for seven days; and from here [we learn] the seven days of mourning.
Custom (source / asmakhta for the seven days of mourning).
The seven days before the Flood serve as a model (or support) for the seven days of mourning observed for the dead.