Sanhedrin 97a
§ Rav Ketina says: Six thousand years is the duration of the world, and it is in ruins for one thousand years. The duration of the period during which the world is in ruins is derived from a verse, as it is stated: “And the Lord alone shall be exalted on that day” (Isaiah 2:11), and the day of God lasts one thousand years. Abaye says: It is in ruins for two thousand years, as it is stated: “After two days He will revive us; in the third day He will revive us, and we shall live in His presence” (Hosea 6:2). It is taught in a baraita in accordance with the opinion of Rav Ketina: Just as the Sabbatical Year abrogates debts once in seven years, so too, the world abrogates its typical existence for one thousand years in every seven thousand years, as it is stated: “And the Lord alone shall be exalted on that day,” and it states: “A psalm, a song for the Shabbat day” (Psalms 92:1), meaning a day, i.e., one thousand years, that is entirely Shabbat. And it says in explanation of the equation between one day and one thousand years: “For a thousand years in Your eyes are but like yesterday when it is past, and like a watch in the night” (Psalms 90:4). The school of Eliyahu taught: Six thousand years is the duration of the world. Two thousand of the six thousand years are characterized by chaos; two thousand years are characterized by Torah, from the era of the Patriarchs until the end of the mishnaic period; and two thousand years are the period of the coming of the Messiah.
Avodah Zarah 9a
In relation to the discussion on the calculation of years, the Gemara states that one of the Sages of the school of Eliyahu taught: The world is destined to exist for six thousand years. For two thousand years the world was waste, as the Torah had not yet been given. The next set of two thousand years are the time period of the Torah. The last set of two thousand years are the period designated for the days of the Messiah, but due to our many sins there are those years that have been taken from them, i.e., such and such years have already passed and have been taken from the two thousand years that are designated for the Messiah, and the Messiah has not yet arrived. Whenever a tanna taught this baraita, he would insert the number of years that was correct for his time. The Gemara asks: With regard to the two thousand years of the time period of the Torah, from when are they counted? If we say that they started from the giving of the Torah until now, then there is not enough time for all of these years. As, when you examine the calculations, it is evident that from the creation of the world until the giving of the Torah there were two thousand years plus a part of this third thousand, as the Torah was given 2,448 years after the creation of the world. This would mean that the time period of the Torah encroaches upon the days of the Messiah.
Sanhedrin 99a
Rav Yehuda says that Shmuel says: The duration of the messianic era is like the duration of the period that runs from the day the world was created until now, i.e., the day when the Messiah will come, as it is stated: “That your days may be multiplied, and the days of your children, in the land that the Lord swore to your fathers to give them, as the days of heaven upon the earth” (Deuteronomy 11:21).