What do we learn from "Samchenu ki'Ymos Anisanu"?
Sanhedrin 97a #1: The days of Mashi'ach will be 40 years, like the years of our affliction - "va'Y'ancha va'Yar'ivecha" (Devarim 8:3).
Sanhedrin 97a #2: The days of Mashi'ach will be 400 years, like the years of our affliction - "v'Inu Osam Arba Me'os Shanah 1 " (Bereishis 15:13).
Rashi (from Shocher Tov): Gladden us in the days of Mashi'ach like the days that You afflicted us 2 in exiles (in Bavel, Madai, Yavan and Edom), and we saw evil.
Radak: Just like You afflicted us in these days and showed to us evil, so gladden us - forever!
Malbim: If it was decreed that we must drink the evil cup in the morning (our youth), gladden us according to the days of our affliction; there will be Simchah corresponding to affliction.
The entire stay of Yisrael in Egypt was only 210 years! Toras Moshe (Shemos 14:30), Malbim (Yeshayah 40:2) - due to the harsh affliction, it was as if they afflicted us for 400 years.